From: Sylvain Pelissier Date: Mon, 2 Oct 2017 07:01:31 +0000 (+0200) Subject: lecroy-xstream: Fix COMM_HEADER and COMM_FORMAT X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=6158728cdb82ecf5a9783fa94489d51c90875f59;hp=47bbc4b531eb8e491115b0dbcb686d23c78235fb lecroy-xstream: Fix COMM_HEADER and COMM_FORMAT --- diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 95e33ac3..63459d0b 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -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; }