Commit Graph

23 Commits

Author SHA1 Message Date
Sebastián Mestre 80b4d04843 Uartstyledecoder refactor (#72)
* fix brackets

* make serialBuffer a member of uartStyleDecoder and add m_ prefix, loosen synchcronization on updateConsole

* make uartStyleDecoder::updateTimer a member variable

* write isEvenParity lambda in a more concise way

* add unused attribute on decode_baudot. make isEvenParity take an argument

* add const where possible on uartStyleDecoder methods

* Refactor performParityCheck to immutability

* Move the computation around a bit. Parameterize with parameters instead of relying on class state

* remove parity!=Node check. isParityCorrect alreaddy checks this.

* Various changes regarding uartStyleDecoder.

 - rename parent to m_parent
 - store baud rate as a member variable
 - use bool instead of unsigned char for single bit values
 - remove maybe_unused attribute on decodeBaudot
 - getUartBit(index) -> getNextUartBit()
2019-03-18 18:14:49 +11:00
Chris Esposito 07997d5774 neatened up a line 2019-02-17 19:20:03 +11:00
Chris Esposito 9eeb3f1e91 UI rework, QLCD error 2019-02-17 17:14:20 +11:00
Chris Esposito 5e185ba08c isoBuffer stores raw pointer 2019-02-15 21:44:02 +11:00
Sebastián Mestre ddb6952f00 Isobuffer refactor - Part 3 (#66)
* Start moving towards cstdint types. Change m_bufferEnd to m_bufferLen (i.e. dont substract 1 when constructing), this fixes a bunch of small bugs and off by one errors

* Fix loop in isoBuffer::getDelayedTriggerPoint not touching the first element

* Comments, formatting

* Reorder some of isobuffer.cpp's functions

* Fix compile error caused by not fully renaming a variable

* Fix some off-by-one errors

* formatting

* Tabs -> Spaces
2019-02-12 18:32:16 +11:00
Chris Esposito 4bafdc1a67
Update isobuffer.cpp 2019-01-29 10:08:09 +11:00
Chris Esposito 0cb7acfbc9
Update isobuffer.cpp 2019-01-29 09:45:45 +11:00
Chris Esposito 9e2f678dce new trigger working (with some bugs) 2019-01-28 20:10:29 +11:00
Chris Esposito 6773347739 Edge detection 2019-01-28 13:39:48 +11:00
Sebastián Mestre 57c7f5f61f Isobuffer refactor - part 2 (#65)
* Split isoBuffer::maybeOutputSampleToFile into two functions

* reorder isoBuffer data members. clean up comments and formatting. clean isoBuffer::writeBuffer

* Remove my name from a comment

* Use type-safe Qt connect. Move comments. change IO column comparison.

* Give isoBuffer the proper ringBuffer behaviour

* Change the behaviour of isoBuffer::readBuffer; Change comments to reflect this.

* Fix a silly mistake in isobuffer.cpp (compiler warnings are awesome)

* Modify isoBuffer::readBuffer

* add destructor to isoBuffer, reorder initializer list. isobuffer.cpp now compiles with no warnings.

* Change isoBuffer::m_buffer to be a unique_ptr

* Change isoBuffer::m_stopDecoding to isoBuffer::m_isDecoding

* Refactor isoBuffer::readBuffer to use unique_ptr. Currently a memory leak

* Change signature of isoBuffer::readBuffer to return unique_ptr. adapt isoDriver acordingly.

* Clean up comments on isobuffer .h and .cpp

* Incorporate review comments: formatting, explicit unique_ptr, spelling
2019-01-28 11:14:04 +11:00
Sebastián Mestre 015d41624d Isobuffer refactor (#64)
* make isobuffer.cpp follow the common bracket style

* Add a few utility functions to isoBuffer, and reorganize and comment isobuffer.h

* refactor a few functions in isoBuffer using the newly added functions

* Clean up isoBuffer::readBuffer. Requires particular attention during review

* remove unused variable isoBuffer::firstTime

* Fix formatting and add a comment to isoBuffer::maybeOutputSampleToFile

* move invariant out of loop in isoBuffer::writeBuffer_short

* Substantially refactor isoBuffer::readBuffer

* change spaces to tabs on isoBuffer.h

* spaces to tabs on isobuffer.cpp and isobuffer.h, but properly

* Enforce const correctness on some methods of isoBuffer

* Add some comments to isobuffer.cpp

* Remove duplication in isoBuffer::cap_xnfromxxx functions by extracting common functionality to a free function

* Format isobuffer.h and isobuffer.cpp

* add inserted count to isoBuffer

* further modification to isoBuffer::readBuffer

* Correct a comment in isoBuffer::readBuffer

* add an anonymous namespace with file-wide constants

* remove isoBuffer::openFile, and move initialization isoBuffer to initializer list

* add lines between if statements in isoBuffer::insertIntoBuffer

* add spaces after // to some comments

* extract common functionality from writeBuffer_xxx functions to function template

* update header file to reflect previous commits

* make isoBuffer::return nullptr in a troublesome case

* add space after // to some other comments

* Make capSample a member function of isoBuffer, delete a macro in isobuffer.cpp

* clean up various comments and declarations in isobuffer.cpp

* make isoBuffer::gainBuffer work for any gain value

* make enableFileIO use the constant definitions made in a recent commit

* Remove type argument from isoBuffer::serialManage

* make isoBuffer::readBuffer return a zero-filled buffer instead of null

* Remove isoBuffer::glitchInsert

* Add a bunch of TODOs to isobuffer.cpp and isobuffer.h

* Rename member variables of isoBuffer to have an m_ prefix

* Move isoBuffer::capSample comparison functors to anonymous namespace

* Make CONSOLE_UPDATE_TIMER_PERIOD on isobuffer.h a constexpr intead of a macro
2019-01-23 16:13:40 +11:00
Chris Esposito 2b5ce2ecc4 Supports odd and even parity 2018-12-11 20:25:14 +11:00
Chris Esposito 124bcd3a61 Timings approximately correct for i2c 2018-11-04 11:31:48 +11:00
Chris Esposito 025df96ea6 DAQ Playback tested and working 2017-12-28 13:23:33 +11:00
Chris Esposito 1bd7af8b48 Prompt when loadingDAQ file. 2017-12-28 10:17:32 +11:00
Chris Esposito 424417aab9 DAQ Files store mode variable 2017-12-27 14:39:56 +11:00
Chris Esposito a772cfb39a DAQ supports Multimeter now 2017-12-27 14:38:16 +11:00
Chris Esposito d5dad1f13f DAQ Settings in. 2017-12-27 12:44:49 +11:00
Chris Esposito d8ea339c56 DAQ Settings in place, just no GUI to configure them. 2017-12-24 14:08:27 +11:00
EspoTek c93cf854da Bit of scaffolding for I2C. Meme commit. 2017-12-01 15:31:21 +11:00
EspoTek 3ab936673a Serial Decoding detects wire disconnects and stops. 2017-11-28 13:09:52 +11:00
EspoTek 5b70ffecbe Added the uart decoder into a separate class. 2017-11-28 11:17:11 +11:00
EspoTek ca2406b2db Cleaned junk out of repo.
Still need to edit history


Former-commit-id: e2061432d4b3d2bbb1f9621f3cce34d43b682b2a
Former-commit-id: aeeed8aa2af692f92b7ea7ec8cc042d49c679ce5
2017-10-21 16:11:49 +11:00