Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#3 Start/Stop/Single Sweep do nothing useful

Ian Dall

The Stop button does nothing except print "STOP" to stdout.
The Start button either does nothing discernible (except print "START" to stdout) or else it corrupts the data acquisition and freezes the application consuming vast amounts of CPU.
The Single trigger mode is not discernibly different to Normal.

These are somewhat related. The Start button fiddles with the device parameters while an acquisition is in process. There is no functional code in HantekDSOWidget::buttonStop_clicked() and TRIGGER_MODE_SINGLE is not used anywhere.

I'm not sure exactly how it was envisaged these might work, but I've provided some useful functionality with the following strategy:

1. In Single sweep mode, stop the acquisition thread when the data acquisitiion is complete. Otherwise it will go ahead and start a new acquisition (as for Normal mode).
2. On refresh, stop the refresh timer if the acquisition thread is stopped because there is no point in refreshing if the data buffer is not changing.
3. When Start is clicked, stop the acquisition thread if it is running, then start the acquisition thread and the refresh timer.
4. When Stop is clicked, stop the acquisition thread and refresh. The refresh will then stop the refresh timer as well as do the actual refresh.

This works for me! Patch attached.


  • Ian Dall
    Ian Dall