]> sigrok.org Git - libsigrok.git/commitdiff
lecroy-xstream: Fix COMM_HEADER and COMM_FORMAT
authorSylvain Pelissier <redacted>
Mon, 2 Oct 2017 07:01:31 +0000 (09:01 +0200)
committerSoeren Apel <redacted>
Tue, 3 Oct 2017 15:31:48 +0000 (17:31 +0200)
src/hardware/lecroy-xstream/protocol.c

index 95e33ac37f1e2d174891aadd85264eb697eb28df..63459d0b8cb412daf850a7841ba59041c10f04c2 100644 (file)
@@ -459,6 +459,10 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi)
                return SR_ERR_NA;
        }
 
+       /* Set the desired response and format modes. */
+       sr_scpi_send(sdi->conn, "COMM_HEADER OFF");
+       sr_scpi_send(sdi->conn, "COMM_FORMAT OFF,WORD,BIN");
+
        devc->analog_groups = g_malloc0(sizeof(struct sr_channel_group*) *
                                scope_models[model_index].analog_channels);
 
@@ -490,9 +494,6 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi)
        if (!(devc->model_state = scope_state_new(devc->model_config)))
                return SR_ERR_MALLOC;
 
-       /* Set the desired response mode. */
-       sr_scpi_send(sdi->conn, "COMM_HEADER OFF,WORD,BIN");
-
        return SR_OK;
 }