scpi-pps: Fix typos and minor cosmetics.
This commit is contained in:
parent
fd2433153a
commit
b89e6db910
|
@ -153,7 +153,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi,
|
||||||
ch = l->data;
|
ch = l->data;
|
||||||
pch = ch->priv;
|
pch = ch->priv;
|
||||||
/* Add mqflags from channel_group_spec only to voltage
|
/* 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)
|
if (pch->mq == SR_MQ_VOLTAGE || pch->mq == SR_MQ_CURRENT)
|
||||||
pch->mqflags = cgs->mqflags;
|
pch->mqflags = cgs->mqflags;
|
||||||
|
@ -173,7 +173,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi,
|
||||||
sr_scpi_hw_info_free(hw_info);
|
sr_scpi_hw_info_free(hw_info);
|
||||||
hw_info = NULL;
|
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 &&
|
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
|
||||||
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
|
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
|
||||||
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
|
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
|
||||||
|
@ -269,7 +269,7 @@ static int dev_open(struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
devc = sdi->priv;
|
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 &&
|
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
|
||||||
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
|
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_REMOTE);
|
||||||
|
@ -303,7 +303,7 @@ static int dev_close(struct sr_dev_inst *sdi)
|
||||||
sr_scpi_cmd(sdi, devc->device->commands,
|
sr_scpi_cmd(sdi, devc->device->commands,
|
||||||
0, NULL, SCPI_CMD_BEEPER_ENABLE);
|
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 &&
|
if (!(devc->device->dialect == SCPI_DIALECT_HP_66XXB &&
|
||||||
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
|
scpi->transport == SCPI_TRANSPORT_LIBGPIB))
|
||||||
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
|
sr_scpi_cmd(sdi, devc->device->commands, 0, NULL, SCPI_CMD_LOCAL);
|
||||||
|
|
|
@ -486,7 +486,6 @@ static const struct scpi_command hp_6630a_cmd[] = {
|
||||||
static int hp_6630a_init_acquisition(const struct sr_dev_inst *sdi)
|
static int hp_6630a_init_acquisition(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
struct sr_scpi_dev_inst *scpi;
|
struct sr_scpi_dev_inst *scpi;
|
||||||
int ret;
|
|
||||||
|
|
||||||
scpi = sdi->conn;
|
scpi = sdi->conn;
|
||||||
|
|
||||||
|
@ -494,11 +493,7 @@ static int hp_6630a_init_acquisition(const struct sr_dev_inst *sdi)
|
||||||
* Monitor CV (1), CC+ (2), UR (4), OVP (8), OTP (16), OCP (64) and
|
* 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.
|
* CC- (256) bits of the Status Register for the FAULT? query.
|
||||||
*/
|
*/
|
||||||
ret = sr_scpi_send(scpi, "UNMASK 607");
|
return sr_scpi_send(scpi, "UNMASK 607");
|
||||||
if (ret != SR_OK)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return SR_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hp_6630a_update_status(const struct sr_dev_inst *sdi)
|
static int hp_6630a_update_status(const struct sr_dev_inst *sdi)
|
||||||
|
@ -779,8 +774,8 @@ static int hp_6630b_update_status(const struct sr_dev_inst *sdi)
|
||||||
/*
|
/*
|
||||||
* Check if output state has changed, due to one of the
|
* Check if output state has changed, due to one of the
|
||||||
* questionable states changed.
|
* questionable states changed.
|
||||||
* NOTE: The output state is send even if it hasn't changed, but that
|
* NOTE: The output state is sent even if it hasn't changed,
|
||||||
* only happends rarely.
|
* but that only happens rarely.
|
||||||
*/
|
*/
|
||||||
ret = sr_scpi_get_bool(scpi, "OUTP:STAT?", &output_enabled);
|
ret = sr_scpi_get_bool(scpi, "OUTP:STAT?", &output_enabled);
|
||||||
if (ret != SR_OK)
|
if (ret != SR_OK)
|
||||||
|
@ -821,10 +816,10 @@ static int hp_6630b_update_status(const struct sr_dev_inst *sdi)
|
||||||
else if (unreg && !cv && !cc_pos && !cc_neg)
|
else if (unreg && !cv && !cc_pos && !cc_neg)
|
||||||
regulation = "UR";
|
regulation = "UR";
|
||||||
else if (!cv && !cc_pos && !cc_neg && !unreg)
|
else if (!cv && !cc_pos && !cc_neg && !unreg)
|
||||||
/* This happends in case of OCP active */
|
/* This happens in case of OCP active. */
|
||||||
regulation = "";
|
regulation = "";
|
||||||
else {
|
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 "
|
sr_dbg("Undefined regulation for HP 66xxB "
|
||||||
"(CV=%i, CC+=%i, CC-=%i, UR=%i).",
|
"(CV=%i, CC+=%i, CC-=%i, UR=%i).",
|
||||||
cv, cc_pos, cc_neg, unreg);
|
cv, cc_pos, cc_neg, unreg);
|
||||||
|
|
Loading…
Reference in New Issue