]> sigrok.org Git - libsigrok.git/commitdiff
conrad-digi-35-cpu: Fix key names for setting voltage and current
authorFrank Stettner <redacted>
Wed, 13 Sep 2017 11:30:24 +0000 (13:30 +0200)
committerUwe Hermann <redacted>
Wed, 13 Sep 2017 12:11:07 +0000 (14:11 +0200)
src/hardware/conrad-digi-35-cpu/api.c

index 03185cca8143dd175b6f4e3f3fe58c2851bd3bb0..0548d50df2b19fef6d3a7f7c0d434819f45c7c8a 100644 (file)
@@ -32,8 +32,8 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_VOLTAGE | SR_CONF_SET,
-       SR_CONF_CURRENT | SR_CONF_SET,
+       SR_CONF_VOLTAGE_TARGET | SR_CONF_SET,
+       SR_CONF_CURRENT_LIMIT | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
 };
 
@@ -102,14 +102,14 @@ static int config_set(uint32_t key, GVariant *data,
        (void)cg;
 
        switch (key) {
-       case SR_CONF_VOLTAGE:
+       case SR_CONF_VOLTAGE_TARGET:
                dblval = g_variant_get_double(data);
                if ((dblval < 0.0) || (dblval > 35.0)) {
                        sr_err("Voltage out of range (0 - 35.0)!");
                        return SR_ERR_ARG;
                }
                return send_msg1(sdi, 'V', (int) (dblval * 10 + 0.5));
-       case SR_CONF_CURRENT:
+       case SR_CONF_CURRENT_LIMIT:
                dblval = g_variant_get_double(data);
                if ((dblval < 0.01) || (dblval > 2.55)) {
                        sr_err("Current out of range (0 - 2.55)!");