From: Martin Ling Date: Tue, 9 May 2017 23:33:58 +0000 (+0100) Subject: rigol-ds: Send *OPC? after commands that don't return a value. X-Git-Tag: libsigrok-0.5.0~71 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=ef7fb1abffad411c1bf20099228e4d23db402a81;hp=bf8a02b63339ac48271ec0c8d4d554e4435b2a44;p=libsigrok.git rigol-ds: Send *OPC? after commands that don't return a value. 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. --- diff --git a/src/hardware/rigol-ds/protocol.c b/src/hardware/rigol-ds/protocol.c index 77af43e9..af10b452 100644 --- a/src/hardware/rigol-ds/protocol.c +++ b/src/hardware/rigol-ds/protocol.c @@ -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;