diff --git a/sw/src/userspace/remotectl.cpp b/sw/src/userspace/remotectl.cpp index 643b2da..74d3931 100644 --- a/sw/src/userspace/remotectl.cpp +++ b/sw/src/userspace/remotectl.cpp @@ -528,6 +528,10 @@ public: void reset() { read_calibration_file(CFG_FILE_CALIBRATION, m_calibration); + + // Disable analog acquisition. This stops any ongoing acquisition. + m_device.set_acquisition_enabled(false); + m_device.set_adc_simulation_enabled(false); m_device.set_digital_simulation_enabled(false); m_device.set_trigger_mode(TRIG_NONE); @@ -539,8 +543,11 @@ public: m_device.set_averaging_enabled(true); m_device.set_shift_steps(0); m_device.set_record_length(1024); - m_device.set_acquisition_enabled(true); m_device.set_timetagger_event_mask(0); + m_device.clear_adc_range(); + + // Enable analog acquisition. + m_device.set_acquisition_enabled(true); } /** @@ -809,6 +816,9 @@ private: } else { double vmin = convert_sample_to_volt(env.channel, min_sample); double vmax = convert_sample_to_volt(env.channel, max_sample); + if (vmin > vmax) { + std::swap(vmin, vmax); + } return str_format("%.6f %.6f", vmin, vmax); } } diff --git a/sw/src/userspace/version.hpp b/sw/src/userspace/version.hpp index e855ba4..0cfc06c 100644 --- a/sw/src/userspace/version.hpp +++ b/sw/src/userspace/version.hpp @@ -1,2 +1,2 @@ #define PUZZLEFW_SW_MAJOR 0 -#define PUZZLEFW_SW_MINOR 1 +#define PUZZLEFW_SW_MINOR 2