]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/rigol-ds/protocol.c
hantek-6xxx: Fix coupling selection.
[libsigrok.git] / src / hardware / rigol-ds / protocol.c
index df72307d411b3924e4d43361240a87034665168f..af10b45250ff5a73784498fbdeacc9e1df95ed9e 100644 (file)
@@ -221,7 +221,7 @@ static int rigol_ds_check_stop(const struct sr_dev_inst *sdi)
                return SR_OK;
 
        if (rigol_ds_config_set(sdi, ":WAV:SOUR CHAN%d",
-                         ch->index + 1) != SR_OK)
+                       ch->index + 1) != SR_OK)
                return SR_ERR;
        /* Check that the number of samples will be accepted */
        if (rigol_ds_config_set(sdi, ":WAV:POIN %d", devc->analog_frame_size) != SR_OK)
@@ -432,7 +432,7 @@ SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi)
                break;
        case PROTOCOL_V3:
                if (rigol_ds_config_set(sdi, ":WAV:SOUR CHAN%d",
-                                 ch->index + 1) != SR_OK)
+                               ch->index + 1) != SR_OK)
                        return SR_ERR;
                if (devc->data_source != DATA_SOURCE_LIVE) {
                        if (rigol_ds_config_set(sdi, ":WAV:RES") != SR_OK)
@@ -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;