Fix MINMAX range, fix RESET
- MINMAX returns values in correct order when converted to Volt. - RESET resets the MINMAX range monitor. - RESET toggles aqcuisition_en to stop ongoing acquisition.
This commit is contained in:
parent
1e1b07019d
commit
16aee1532d
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define PUZZLEFW_SW_MAJOR 0
|
||||
#define PUZZLEFW_SW_MINOR 1
|
||||
#define PUZZLEFW_SW_MINOR 2
|
||||
|
|
Loading…
Reference in New Issue