From: Guido Trentalancia Date: Tue, 20 Nov 2018 22:22:29 +0000 (+0100) Subject: hameg-hmo: Rename SCPI_CMD_GET_VERTICAL_DIV to *_SCALE. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=66ddc22a1d20244df7c7b39ab392104976fa93f8;p=libsigrok.git hameg-hmo: Rename SCPI_CMD_GET_VERTICAL_DIV to *_SCALE. Fix the name of the SCPI command used to get the vertical scale. --- diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 9ae139b9..f3e587f0 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -315,7 +315,7 @@ static int config_set(uint32_t key, GVariant *data, g_ascii_formatd(float_str, sizeof(float_str), "%E", (float) (*model->vdivs)[idx][0] / (*model->vdivs)[idx][1]); g_snprintf(command, sizeof(command), - (*model->scpi_dialect)[SCPI_CMD_SET_VERTICAL_DIV], + (*model->scpi_dialect)[SCPI_CMD_SET_VERTICAL_SCALE], j + 1, float_str); if (sr_scpi_send(sdi->conn, command) != SR_OK || sr_scpi_get_opc(sdi->conn) != SR_OK) diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 2806352b..8ba2a35e 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -39,8 +39,8 @@ static const char *hameg_scpi_dialect[] = { [SCPI_CMD_GET_SAMPLE_RATE] = ":ACQ:SRAT?", [SCPI_CMD_GET_ANALOG_DATA] = ":FORM:BORD %s;" \ ":FORM REAL,32;:CHAN%d:DATA?", - [SCPI_CMD_GET_VERTICAL_DIV] = ":CHAN%d:SCAL?", - [SCPI_CMD_SET_VERTICAL_DIV] = ":CHAN%d:SCAL %s", + [SCPI_CMD_GET_VERTICAL_SCALE] = ":CHAN%d:SCAL?", + [SCPI_CMD_SET_VERTICAL_SCALE] = ":CHAN%d:SCAL %s", [SCPI_CMD_GET_DIG_POD_STATE] = ":POD%d:STAT?", [SCPI_CMD_SET_DIG_POD_STATE] = ":POD%d:STAT %d", [SCPI_CMD_GET_TRIGGER_SLOPE] = ":TRIG:A:EDGE:SLOP?", @@ -76,8 +76,8 @@ static const char *rohde_schwarz_log_not_pod_scpi_dialect[] = { [SCPI_CMD_GET_SAMPLE_RATE] = ":ACQ:SRAT?", [SCPI_CMD_GET_ANALOG_DATA] = ":FORM:BORD %s;" \ ":FORM REAL,32;:CHAN%d:DATA?", - [SCPI_CMD_GET_VERTICAL_DIV] = ":CHAN%d:SCAL?", - [SCPI_CMD_SET_VERTICAL_DIV] = ":CHAN%d:SCAL %s", + [SCPI_CMD_GET_VERTICAL_SCALE] = ":CHAN%d:SCAL?", + [SCPI_CMD_SET_VERTICAL_SCALE] = ":CHAN%d:SCAL %s", [SCPI_CMD_GET_DIG_POD_STATE] = ":LOG%d:STAT?", [SCPI_CMD_SET_DIG_POD_STATE] = ":LOG%d:STAT %d", [SCPI_CMD_GET_TRIGGER_SLOPE] = ":TRIG:A:EDGE:SLOP?", @@ -894,7 +894,7 @@ static int analog_channel_state_get(struct sr_dev_inst *sdi, ch->enabled = state->analog_channels[i].state; g_snprintf(command, sizeof(command), - (*config->scpi_dialect)[SCPI_CMD_GET_VERTICAL_DIV], + (*config->scpi_dialect)[SCPI_CMD_GET_VERTICAL_SCALE], i + 1); if (sr_scpi_get_string(scpi, command, &tmp_str) != SR_OK) diff --git a/src/scpi.h b/src/scpi.h index 256aa4c1..b66dd554 100644 --- a/src/scpi.h +++ b/src/scpi.h @@ -35,8 +35,8 @@ enum { SCPI_CMD_GET_TIMEBASE = 1, SCPI_CMD_SET_TIMEBASE, - SCPI_CMD_GET_VERTICAL_DIV, - SCPI_CMD_SET_VERTICAL_DIV, + SCPI_CMD_GET_VERTICAL_SCALE, + SCPI_CMD_SET_VERTICAL_SCALE, SCPI_CMD_GET_TRIGGER_SLOPE, SCPI_CMD_SET_TRIGGER_SLOPE, SCPI_CMD_GET_TRIGGER_PATTERN,