]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-dmm/protocol.c
scpi-dmm: use different Agilent SCPI command for range and measurment
[libsigrok.git] / src / hardware / scpi-dmm / protocol.c
index 97a783fe387f4aec29157c5cb250beb08463b021..1a967358907099261627d4d364c032b6329027ac 100644 (file)
@@ -237,9 +237,8 @@ SR_PRIV int scpi_dmm_set_range_from_text(const struct sr_dev_inst *sdi,
 
        is_auto = g_ascii_strcasecmp(range, "auto") == 0;
        scpi_dmm_cmd_delay(sdi->conn);
-       ret = sr_scpi_cmd(sdi, devc->cmdset, 0, NULL,
-               is_auto ? DMM_CMD_SETUP_RANGE_AUTO : DMM_CMD_SETUP_RANGE,
-               item->scpi_func_setup, is_auto ? "" : range);
+       ret = sr_scpi_cmd(sdi, devc->cmdset, 0, NULL, DMM_CMD_SETUP_RANGE,
+               item->scpi_func_setup, is_auto ? "AUTO" : range);
        if (ret != SR_OK)
                return ret;