Due to a PEBKAC error, after the last sample was sent, a new
measurement was triggered, but its value was never sent down the
session bus. This is easily fixed by incrementing devc->num_samples
right after a measurement is sent instead of when a measurement is
retriggered.
return FALSE;
}
- if (devc->acq_state == ACQ_GOT_MEASUREMENT)
+ if (devc->acq_state == ACQ_GOT_MEASUREMENT) {
acq_send_measurement(sdi);
+ devc->num_samples++;
+ }
if (devc->limit_samples && (devc->num_samples >= devc->limit_samples)) {
sdi->driver->dev_acquisition_stop(sdi, cb_data);
/* Got more to go. */
if (devc->acq_state == ACQ_GOT_MEASUREMENT) {
/* Retrigger */
- devc->num_samples++;
retrigger_measurement(scpi, devc);
}