Commit Graph

278 Commits

Author SHA1 Message Date
Chris Esposito 25a9196ea2 labrador_bootstrap_pi 2019-04-25 20:30:08 +10:00
Chris Esposito 3aa577aef8 Better laid out UI 2019-04-25 20:19:14 +10:00
Chris Esposito 003f3d94cd Fixed crash when triggering state was uninitialised 2019-04-25 10:41:29 +10:00
Chris Esposito 23c2fee6f9 Added back in darealshinji's libstdc++ workaround 2019-04-24 20:18:12 +10:00
Chris Esposito 6223662616 Uses make install 2019-04-24 20:06:10 +10:00
Chris Esposito e9138dfa5b Reverted yesterday's changes 2019-04-24 19:11:49 +10:00
Chris Esposito a51508bdd1
Update Labrador.pro 2019-04-24 08:24:49 +10:00
Chris Esposito 9e1b4c8f04 Desktop file fixes 2019-04-23 20:38:36 +10:00
Chris Esposito e65c2573cc better AppRun 2019-04-23 19:59:06 +10:00
Chris Esposito 0b12407307 Icon and Desktop file in portable builds 2019-04-23 19:02:13 +10:00
Chris Esposito e8a817fe4d Cleaner icon and desktop structure; added to makefile 2019-04-23 18:50:09 +10:00
Chris Esposito 8278bbb374 Uses darealshinji's AppImage tool for better compatibility with old linux 2019-04-23 18:22:42 +10:00
Chris Esposito f13b720e22 DO_QUOTE macro 2019-04-01 21:35:58 +11:00
Chris Esposito 5cc7c9425d Standard QSettings fixes Windows calibration issue 2019-04-01 20:00:43 +11:00
Chris Esposito aff7f91b7d help/about updated for continuous release 2019-04-01 19:53:19 +11:00
Chris Esposito 26352bbc56 Fixed Windows build 2019-04-01 19:27:08 +11:00
Sebastián Mestre 3c0616a46f I2cdecoder refactor (#76)
* Use Qt5 type-safe connect on i2cDecoder

* Add destructor, fixing a memory leak in i2cDecoder

* Remove commented debug print

* formatting
2019-04-01 08:31:52 +11:00
Sebastián Mestre e6f0e24a28 'Functiongencontrol refactor - part 3 (#74)
* move ChannelID to outside of functionGenControl

* move ChannelData out of functionGenControl

* make the genericUsbDriver fGenPtrs into an array

* Make genericUsbDriver store pointers to ChannelData instead of to functionGenControl

* split genericUsbDriver::setFunctionGen into two parts. Stop reassigning the fGen pointers

* Big functionGenControl refactor

- Create functionGen namespace
- Rename functionGenControl to DualChannelController
- Create a SingleChannelController class that holds all the
functionality of a single channel (i.e. almost all of it).
This class acts as a Qt wrapper over the actual data, it
gives it the ability to emit and recieve signals while
keeping the actual data copiable.
- Add an alias functionGenControl = DualChannelController
2019-03-26 10:12:08 +11:00
Chris Esposito 525b03de1c
Update uartstyledecoder.cpp 2019-03-19 17:53:56 +11:00
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
Sebastián Mestre eeb0db0318 Access the pointer directly on isoBufferBuffer::insert (#71) 2019-03-10 09:13:46 +11:00
Chris Esposito 681ef5cb13
length cast to double 2019-03-07 20:00:40 +11:00
Sebastián Mestre c149063452 Functiongencontrol refactor - part 2 (#69)
* use an enum instead of int to identify function generator channels

* Use local 8 bit encoding instead of utf8 for file paths

* use static_cast instead of function-style casts

* remove length member from channelData struct. use reference captures on some lambdas
2019-03-07 19:58:52 +11:00
Sebastián Mestre a144105b23 Functiongencontrol refactor (#68)
* Add struct definition for functionGenControl channel data

* Add member variables for channel data to functionGenControl, deprecate old variables

* fix a typo

* Transition to new functionGenControl cahnnel data variables. Remove old ones.

* refactor genericUsbDriver::setFunctionGen to use the new ChannelData struct.

* functionGenControl: free(NULL) is safe

* Eliminate duplication of functionGenControl::waveformName_CH* fuctions by putting common things into a private template function

* get rid of comments added during refactor

* Move function gen channel data to use std::vector. algorithmify some code on genericUsbDriver::setFunctionGen

* various formatting changes, remove irrelevant comments

* functionGenControl::waveformName: always use utf8 and 16 byte buffers. Remove template

* fix typo introduced by last-second indentation change

* genericUsbDrive::setFunctionGen: shrink samples to fit

* functionGenControl::waveformName: clean up file path manipulation, clean up formatting

* change the two channel objects to an array of two elements. Add common implementations for all methods of functionGenControl. Fix a massive bug introduced earlier in the refactor. Formatting.
2019-03-04 20:02:18 +11:00
Chris Esposito 07997d5774 neatened up a line 2019-02-17 19:20:03 +11:00
Chris Esposito 1479d95f97 frontend for offset and attenuation: 2019-02-17 19:08:50 +11:00
Chris Esposito 17277fece6 Fixed multimeter LCD display rendering issue 2019-02-17 18:52:42 +11:00
Chris Esposito 9eeb3f1e91 UI rework, QLCD error 2019-02-17 17:14:20 +11:00
Chris Esposito b78a65174f Added attenuation and offset to backend 2019-02-17 16:39:11 +11:00
Chris Esposito 5e185ba08c isoBuffer stores raw pointer 2019-02-15 21:44:02 +11:00
Chris Esposito b4f54d5d99 trigger CH2 works 2019-02-15 21:03:02 +11:00
Chris Esposito 68512ebe95 isoBuffer CH2 has correct channel 2019-02-15 20:59:41 +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
Chris Esposito 39524b4d04 Nuked Trigger 2019-01-28 11:54:35 +11:00
Chris Esposito b0ac0cc645 Added Documentation and Pinout links 2019-01-28 11:34:04 +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
Chris Esposito 31f68faf4e
Update isobuffer.h 2019-01-23 16:14:24 +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
Sebastián Mestre 4499db10bf Isobufferbuffer integration (#62)
* Update all code to use the new isoBufferBuffer interface, and remove the old one; also rename isoBufferBuffer::add(uint8_t) to insert_hex

* remove unnecessary include directive from isobuffer.h

* Remove 'Legacy Interface' comment from isoBufferBuffer header and implementation, move insert_hex closer to other insert functions in the header and implementation

* Remove TODO comment of a finished task
2018-12-31 10:02:04 +11:00
Sebastián Mestre 607734c60d isoBufferBuffer refactor (#61)
* Reimplements isoBufferBuffer and fixes a potential memory leak due to lack of a destructor
2018-12-28 09:51:10 +11:00
Chris Esposito 14a5ab67ff
Added C++14 support to qmake file 2018-12-27 11:49:11 +11:00
Chris Esposito 2b5ce2ecc4 Supports odd and even parity 2018-12-11 20:25:14 +11:00
Chris Esposito f2c7427f2c
std::abs() => abs in espoSpinbox 2018-11-07 20:22:02 +11:00
Chris Esposito b0f5e98bff Single Shot consistent with other pause methods 2018-11-06 14:11:21 +11:00
Chris Esposito 76154a6f7f Trigger count thresh no longer has bad offset 2018-11-06 14:04:53 +11:00
Chris Esposito 086c6634fc changing window size does not affect trigger position 2018-11-06 13:49:53 +11:00
Chris Esposito 108bfdb3c6 Pausing while triggered does not affect trigger delay 2018-11-06 13:45:34 +11:00
Chris Esposito d23831868e espoSpinBox no longer shows float precision errors near zero 2018-11-06 12:53:37 +11:00
Chris Esposito 2158a6f58b Reset twoWire on error rather than crash 2018-11-06 12:06:28 +11:00
Chris Esposito 1d9f2398bb Nicer looking textEdits 2018-11-06 11:50:26 +11:00
Chris Esposito 672cf414d1 isobufferbuffer can take uint8_t 2018-11-06 10:55:45 +11:00
Chris Esposito effeb8ed4a Data decode _should_ work (untested) 2018-11-06 10:46:47 +11:00
Chris Esposito b5069f1264 Address gets sent to console along with r/w and ACK 2018-11-06 10:36:04 +11:00
Chris Esposito b19900e9a0 IsoBufferBuffer cleaned 2018-11-06 10:15:48 +11:00
Chris Esposito bdf1055157 Decodes address bytes 2018-11-06 09:50:36 +11:00
EspoTek 5df3e30780 FIrmware version 0006: Fixes issue with logic analyzer channels being 2.6us out of sync 2018-11-06 09:14:13 +11:00
Chris Esposito e63a97e23a I2C start condition does not get detected as stop 2018-11-04 11:46:17 +11:00
Chris Esposito 124bcd3a61 Timings approximately correct for i2c 2018-11-04 11:31:48 +11:00
Chris Esposito e5bfb2e748 i2c state invalidation fix 2018-11-04 10:49:10 +11:00
Chris Esposito 2772fee1cd i2c state invalidation 2018-11-04 10:47:25 +11:00
Chris Esposito 0f00af0c08 i2c decoder no longer tries to read invalid buffer region 2018-11-04 10:36:11 +11:00
Chris Esposito d65b647ab4 Fixed some I2C edge detection issues 2018-11-04 10:07:15 +11:00
Chris Esposito 23832f1b13
No longer uses std::abs() on a double!! 2018-10-29 20:16:42 +11:00
Chris Esposito c126590a74 Fixed espoSpinBox issues 2018-09-22 06:04:52 +10:00
Chris Esposito fa3d680c55 espoSpinBox fixed behaviour when entering negative values 2018-09-18 08:24:13 +10:00
Chris Esposito 56468e9917 espospinbox does not change value until enter is pressed. scoperangeenterdialog supports changeStepping() 2018-09-17 19:12:07 +10:00
Chris Esposito 50515b545c espoSpinBox handles negative values 2018-09-17 18:56:33 +10:00
Chris Esposito 2593bfc0c6 scopeRangeEnterDialog spinboxes promoted to espoSpinBox 2018-09-17 18:51:58 +10:00
Chris Esposito 0b7f1218f9 EspoSpinBox has better input algorithm 2018-09-17 12:01:17 +10:00
EspoTek bd0e618a45 Fixed Issue 51 (I think, unable to test) 2018-09-16 14:14:12 +10:00
Chris Esposito 39d1bff5ab Fixed segfault; now displays message about iso failure too 2018-09-11 08:46:15 +10:00
Chris Esposito 7a2f8cf35a Added option to hide graphs when paused 2018-09-05 08:26:21 +10:00
Chris Esposito 1a3fd72041 Can put scope range dialog on main window 2018-09-04 20:24:08 +10:00
Chris Esposito dde6d6ac42 Started Debugging i2c 2018-09-04 18:55:03 +10:00
Chris Esposito c96dd98c0f Added start of UI elements for I2C 2018-09-03 06:11:53 +10:00
Chris Esposito ba4644bc35 i2c clock multiplication in place 2018-08-14 17:40:55 +10:00
Chris Esposito 2ba556bbe9 usbIsoInit returns error on failure 2018-08-14 17:19:17 +10:00
EspoTek 2c2db8855b Fixed resolution scaling issues. (See Issue #46) 2018-08-12 16:28:14 +10:00
EspoTek b112f5b691 Fixed build problems. 2018-08-12 16:21:05 +10:00
EspoTek 655258e98d Merge branch 'master' of https://github.com/EspoTek/Labrador 2018-08-12 16:18:33 +10:00
Chris Esposito ca86c1da0a basic i2c skeleton in place and fleshed out. Have to get the timings right (e.g. data bytes should only be read in on the middle of each scl high pulse) and then debug but coming together 2018-08-08 19:20:32 +10:00
Chris Esposito b5afeff380 more... 2018-08-08 19:14:08 +10:00
Chris Esposito a998a59a60 more fleshing...: 2018-08-08 18:58:41 +10:00
Chris Esposito 95b4a01d81 More fleshed out state machine 2018-08-08 18:35:26 +10:00
Chris Esposito 091c37cd37 START and STOP transitions in state machine 2018-08-08 09:31:05 +10:00
Chris Esposito b414923fd3 more i2c flesh 2018-08-08 09:19:30 +10:00
Chris Esposito 2d1bd5f438 resolution hard-coded 2018-08-07 22:11:12 +10:00
Chris Esposito ddf60d5c63 Low resolution mode only activated on low resolution displays 2018-08-08 03:10:47 +10:00
Chris Esposito b55ec2b0aa Fixed rendering issues on low-resolution displays 2018-08-08 02:52:56 +10:00
Chris Esposito 634a046097 more i2 skeleton 2018-08-02 18:27:09 +10:00
Chris Esposito 4c61a0a327 another i2c function 2018-07-31 09:05:58 +10:00
Chris Esposito 6ff66a4c43 Serial should no longer try to decode since the start of time when first activated 2018-07-27 18:39:13 +10:00
Chris Esposito d1ac3618f5 very basic skellington code for i2c in 2018-07-27 18:39:13 +10:00
Chris Esposito 8fa060e2aa reloads udev rules when make install is called 2018-07-21 10:24:49 +10:00
Chris Esposito a0a17e904f make install works 2018-07-19 16:38:42 +10:00
EspoTek c5495ca806 On-boot calibration calls PSU calibration too 2018-06-04 19:18:26 +10:00