rigol-ds1xx2: Send a SR_DF_END packet before acquisition stop.

Without a SR_DF_END samples could be cached in the internal buffer of an output
module and never flushed, therefore they would be missing in the final output.

By sending a SR_DF_END packet we force the output to be flushed.
This commit is contained in:
poljar (Damir Jelić) 2013-11-15 16:54:55 +01:00 committed by Bert Vermeulen
parent 449cc16bb2
commit 1130e4229b
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ SR_PRIV int rigol_ds1xx2_receive(int fd, int revents, void *cb_data)
rigol_ds1xx2_send(sdi, ":WAV:DATA? DIG"); rigol_ds1xx2_send(sdi, ":WAV:DATA? DIG");
} else if (++devc->num_frames == devc->limit_frames) { } else if (++devc->num_frames == devc->limit_frames) {
/* End of last frame. */ /* End of last frame. */
packet.type = SR_DF_END;
sr_session_send(sdi, &packet);
sdi->driver->dev_acquisition_stop(sdi, cb_data); sdi->driver->dev_acquisition_stop(sdi, cb_data);
} else { } else {
/* Get the next frame, starting with the first analog channel. */ /* Get the next frame, starting with the first analog channel. */