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.
---
hardware/rigol-ds1xx2/protocol.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hardware/rigol-ds1xx2/protocol.c b/hardware/rigol-ds1xx2/protocol.c
index 001d671..0efff69 100644
--- a/hardware/rigol-ds1xx2/protocol.c
+++ b/hardware/rigol-ds1xx2/protocol.c
@@ -123,6 +123,8 @@ SR_PRIV int rigol_ds1xx2_receive(int fd, int revents, void
*cb_data)
rigol_ds1xx2_send(sdi, ":WAV:DATA? DIG");
} else if (++devc->num_frames == devc->limit_frames) {
/* End of last frame. */
+ packet.type = SR_DF_END;
+ sr_session_send(sdi, &packet);
sdi->driver->dev_acquisition_stop(sdi, cb_data);
} else {
/* Get the next frame, starting with the first
analog channel. */
--
1.8.4.2
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel