]> sigrok.org Git - libsigrok.git/commitdiff
lecroy-xstream: Fix trigger source/slope
authorSoeren Apel <redacted>
Tue, 3 Oct 2017 14:48:57 +0000 (16:48 +0200)
committerSoeren Apel <redacted>
Tue, 3 Oct 2017 15:31:48 +0000 (17:31 +0200)
src/hardware/lecroy-xstream/api.c

index 2bcf2cd00567443e0c2f7ef4cd4bc8a8fe548365..6b4842ba3b6786441b216fea0e5649ec410bda1c 100644 (file)
@@ -227,7 +227,7 @@ static int config_set(uint32_t key, GVariant *data,
                        return SR_ERR_ARG;
                state->trigger_source = idx;
                g_snprintf(command, sizeof(command),
-                               "SET TRIGGER SOURCE %s", (*model->trigger_sources)[idx]);
+                               "TRIG_SELECT EDGE,SR,%s", (*model->trigger_sources)[idx]);
                ret = sr_scpi_send(sdi->conn, command);
                break;
        case SR_CONF_VDIV:
@@ -272,7 +272,8 @@ static int config_set(uint32_t key, GVariant *data,
                        return SR_ERR_ARG;
                state->trigger_slope = idx;
                g_snprintf(command, sizeof(command),
-                               "SET TRIGGER SLOPE %s", (*model->trigger_slopes)[idx]);
+                               "%s:TRIG_SLOPE %s", (*model->trigger_sources)[state->trigger_source],
+                               (*model->trigger_slopes)[idx]);
                ret = sr_scpi_send(sdi->conn, command);
                break;
        case SR_CONF_COUPLING: