]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds: Send *OPC? after commands that don't return a value.
authorMartin Ling <redacted>
Tue, 9 May 2017 23:33:58 +0000 (00:33 +0100)
committerMartin Ling <redacted>
Tue, 9 May 2017 23:33:58 +0000 (00:33 +0100)
Fixes #933.

We'd already had this problem elsewhere and thus have this wrapper function
that does this where necessary. It just wasn't in use on these two call sites,
which was causing timing problems when used over tcp-raw or VXI transports.

src/hardware/rigol-ds/protocol.c

index 77af43e94d3d3af4f7bdc93a693dd9f781d03c61..af10b45250ff5a73784498fbdeacc9e1df95ed9e 100644 (file)
@@ -595,10 +595,10 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
 
        if (devc->num_block_bytes == 0) {
                if (devc->model->series->protocol >= PROTOCOL_V4) {
-                       if (sr_scpi_send(sdi->conn, ":WAV:START %d",
+                       if (rigol_ds_config_set(sdi, ":WAV:START %d",
                                        devc->num_channel_bytes + 1) != SR_OK)
                                return TRUE;
-                       if (sr_scpi_send(sdi->conn, ":WAV:STOP %d",
+                       if (rigol_ds_config_set(sdi, ":WAV:STOP %d",
                                        MIN(devc->num_channel_bytes + ACQ_BLOCK_SIZE,
                                                devc->analog_frame_size)) != SR_OK)
                                return TRUE;