]> sigrok.org Git - libsigrok.git/commitdiff
hameg-hmo: Rename SCPI_CMD_GET_VERTICAL_DIV to *_SCALE.
authorGuido Trentalancia <redacted>
Tue, 20 Nov 2018 22:22:29 +0000 (23:22 +0100)
committerUwe Hermann <redacted>
Thu, 25 Jul 2019 22:55:40 +0000 (00:55 +0200)
Fix the name of the SCPI command used to get the vertical scale.

src/hardware/hameg-hmo/api.c
src/hardware/hameg-hmo/protocol.c
src/scpi.h

index 9ae139b9d3acc44d92c16144b03cb18108fd1c2f..f3e587f04c3a8c48d450e455988c04dc62659f77 100644 (file)
@@ -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)
index 2806352bf157308818890a2a3fe7cc18e8c0ed1a..8ba2a35e68b5030f5f2b4fb5e2a79303e6452e23 100644 (file)
@@ -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)
index 256aa4c1ceb9ba6b08d36b6c90ccecfebcd4051a..b66dd554d5048851ca0362ef1cefd0fbad046889 100644 (file)
@@ -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,