From: Valentin Ochs Date: Thu, 11 Jun 2020 11:53:12 +0000 (+0200) Subject: rigol-ds: Do not stop reading after the first frame X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=418c99248cd9fe7913c3c337e831b3c601a9227a;p=libsigrok.git rigol-ds: Do not stop reading after the first frame --- diff --git a/src/hardware/rigol-ds/protocol.c b/src/hardware/rigol-ds/protocol.c index 688dcc39..6d8abc1e 100644 --- a/src/hardware/rigol-ds/protocol.c +++ b/src/hardware/rigol-ds/protocol.c @@ -756,12 +756,8 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data) if (devc->data_source != DATA_SOURCE_LIVE) rigol_ds_set_wait_event(devc, WAIT_BLOCK); } - /* End acquisition when data for all channels is acquired. */ if (!sr_scpi_read_complete(scpi) && !devc->channel_entry->next) { sr_err("Read should have been completed"); - std_session_send_df_frame_end(sdi); - sr_dev_acquisition_stop(sdi); - return TRUE; } devc->num_block_read = 0; } else { @@ -795,7 +791,7 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data) /* Done with this frame. */ std_session_send_df_frame_end(sdi); - if (++devc->num_frames == devc->limit_frames) { + if (++devc->num_frames == devc->limit_frames || devc->data_source == DATA_SOURCE_MEMORY) { /* Last frame, stop capture. */ sr_dev_acquisition_stop(sdi); } else {