ch = l->data;
pch = ch->priv;
/* Add mqflags from channel_group_spec only to voltage
- * and current channels
+ * and current channels.
*/
if (pch->mq == SR_MQ_VOLTAGE || pch->mq == SR_MQ_CURRENT)
pch->mqflags = cgs->mqflags;
sr_scpi_hw_info_free(hw_info);
hw_info = NULL;
- /* Don't send SCPI_CMD_LOCAL for HP 66xxB devices using SCPI over GPIB */
+ /* Don't send SCPI_CMD_LOCAL for HP 66xxB using SCPI over GPIB. */
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
devc = sdi->priv;
- /* Don't send SCPI_CMD_REMOTE for HP 66xxB devices using SCPI over GPIB */
+ /* Don't send SCPI_CMD_REMOTE for HP 66xxB using SCPI over GPIB. */
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_REMOTE);
sr_scpi_cmd(sdi, devc->device->commands,
0, NULL, SCPI_CMD_BEEPER_ENABLE);
- /* Don't send SCPI_CMD_LOCAL for HP 66xxB devices using SCPI over GPIB */
+ /* Don't send SCPI_CMD_LOCAL for HP 66xxB using SCPI over GPIB. */
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
static int hp_6630a_init_acquisition(const struct sr_dev_inst *sdi)
{
struct sr_scpi_dev_inst *scpi;
- int ret;
scpi = sdi->conn;
* Monitor CV (1), CC+ (2), UR (4), OVP (8), OTP (16), OCP (64) and
* CC- (256) bits of the Status Register for the FAULT? query.
*/
- ret = sr_scpi_send(scpi, "UNMASK 607");
- if (ret != SR_OK)
- return ret;
-
- return SR_OK;
+ return sr_scpi_send(scpi, "UNMASK 607");
}
static int hp_6630a_update_status(const struct sr_dev_inst *sdi)
regulation_changed = (fault & (1 << 9)) | regulation_changed;
if (regulation_changed) {
- if (cv && !cc_pos && !cc_neg &&!unreg)
+ if (cv && !cc_pos && !cc_neg && !unreg)
regulation = "CV";
else if (cc_pos && !cv && !cc_neg && !unreg)
regulation = "CC";
regulation = "CC-";
else if (unreg && !cv && !cc_pos && !cc_neg)
regulation = "UR";
- else if (!cv && !cc_pos && !cc_neg &&!unreg)
+ else if (!cv && !cc_pos && !cc_neg && !unreg)
regulation = "";
else {
sr_dbg("Undefined regulation for HP 66xxA "
/*
* Check if output state has changed, due to one of the
* questionable states changed.
- * NOTE: The output state is send even if it hasn't changed, but that
- * only happends rarely.
+ * NOTE: The output state is sent even if it hasn't changed,
+ * but that only happens rarely.
*/
ret = sr_scpi_get_bool(scpi, "OUTP:STAT?", &output_enabled);
if (ret != SR_OK)
}
if (regulation_changed) {
- if (cv && !cc_pos && !cc_neg &&!unreg)
+ if (cv && !cc_pos && !cc_neg && !unreg)
regulation = "CV";
else if (cc_pos && !cv && !cc_neg && !unreg)
regulation = "CC";
regulation = "CC-";
else if (unreg && !cv && !cc_pos && !cc_neg)
regulation = "UR";
- else if (!cv && !cc_pos && !cc_neg &&!unreg)
- /* This happends in case of OCP active */
+ else if (!cv && !cc_pos && !cc_neg && !unreg)
+ /* This happens in case of OCP active. */
regulation = "";
else {
- /* This happends from time to time (CV and CC+ active). */
+ /* This happens from time to time (CV and CC+ active). */
sr_dbg("Undefined regulation for HP 66xxB "
"(CV=%i, CC+=%i, CC-=%i, UR=%i).",
cv, cc_pos, cc_neg, unreg);