For devices such as the HP 6632B the following invocation was failing due to
scpi_cmd(sdi, SCPI_CMD_SELECT_CHANNEL, ...) returning SR_OK_CONTINUE.
./sigrok-cli -d scpi-pps:conn=/dev/ttyUSB0:serialcomm=9600/8n1 --continuous
sr: session: sr_session_start: could not start an acquisition (not enough data to decide error status yet)
Failed to start session.
/* Prime the pipe with the first channel's fetch. */
ch = next_enabled_channel(sdi, NULL);
pch = ch->priv;
- if ((ret = select_channel(sdi, ch)) != SR_OK)
+ if ((ret = select_channel(sdi, ch)) < 0)
return ret;
if (pch->mq == SR_MQ_VOLTAGE)
cmd = SCPI_CMD_GET_MEAS_VOLTAGE;
}
}
- if ((ret = scpi_cmd(sdi, SCPI_CMD_SELECT_CHANNEL, new_pch->hwname)) == SR_OK)
+ if ((ret = scpi_cmd(sdi, SCPI_CMD_SELECT_CHANNEL, new_pch->hwname)) >= 0)
devc->cur_channel = ch;
return ret;