From: Bert Vermeulen Date: Fri, 17 Oct 2014 01:00:55 +0000 (+0200) Subject: scpi-pps: Start acquisition on the first enabled channel. X-Git-Tag: libsigrok-0.4.0~850 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=984e4b0db88cddc880f5a76bc97ebbba7cb7c39d;p=libsigrok.git scpi-pps: Start acquisition on the first enabled channel. --- diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index 813bf7f3..891236a8 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -507,9 +507,10 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, std_session_send_df_header(sdi, LOG_PREFIX); /* Prime the pipe with the first channel's fetch. */ - ch = sdi->channels->data; + ch = next_enabled_channel(sdi, NULL); pch = ch->priv; - select_channel(sdi, ch); + if ((ret = select_channel(sdi, ch)) != SR_OK) + return ret; if (pch->mq == SR_MQ_VOLTAGE) cmd = SCPI_CMD_GET_MEAS_VOLTAGE; else if (pch->mq == SR_MQ_CURRENT)