rigol-ds: Make sure to always send SR_DF_END at end of capture.
This commit is contained in:
parent
4914dd4b9a
commit
b751cf7a82
|
@ -891,6 +891,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
{
|
{
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
struct sr_scpi_dev_inst *scpi;
|
struct sr_scpi_dev_inst *scpi;
|
||||||
|
struct sr_datafeed_packet packet;
|
||||||
|
|
||||||
(void)cb_data;
|
(void)cb_data;
|
||||||
|
|
||||||
|
@ -901,6 +902,10 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* End of last frame. */
|
||||||
|
packet.type = SR_DF_END;
|
||||||
|
sr_session_send(sdi, &packet);
|
||||||
|
|
||||||
g_slist_free(devc->enabled_analog_probes);
|
g_slist_free(devc->enabled_analog_probes);
|
||||||
g_slist_free(devc->enabled_digital_probes);
|
g_slist_free(devc->enabled_digital_probes);
|
||||||
devc->enabled_analog_probes = NULL;
|
devc->enabled_analog_probes = NULL;
|
||||||
|
|
|
@ -590,9 +590,6 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
devc->channel_entry = devc->enabled_digital_probes;
|
devc->channel_entry = devc->enabled_digital_probes;
|
||||||
rigol_ds_channel_start(sdi);
|
rigol_ds_channel_start(sdi);
|
||||||
} else if (++devc->num_frames == devc->limit_frames) {
|
} 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);
|
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. */
|
||||||
|
|
Loading…
Reference in New Issue