]> sigrok.org Git - libsigrok.git/commitdiff
atten-pps3xxx: Fix output channel mode get.
authorBert Vermeulen <redacted>
Mon, 13 Jan 2014 01:05:39 +0000 (02:05 +0100)
committerBert Vermeulen <redacted>
Mon, 13 Jan 2014 01:05:39 +0000 (02:05 +0100)
hardware/atten-pps3xxx/api.c

index 3579d5c8f560276a102983b918369ef14e1f2ce3..5ca684de039c20e1b7c163fb0e79bdce8f509403 100644 (file)
@@ -234,7 +234,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
                /* No probe group: global options. */
                switch (key) {
                case SR_CONF_OUTPUT_CHANNEL:
-                       *data = g_variant_new_string(channel_modes[devc->channel_mode - 1]);
+                       *data = g_variant_new_string(channel_modes[devc->channel_mode]);
                        break;
                case SR_CONF_OVER_CURRENT_PROTECTION:
                        *data = g_variant_new_boolean(devc->over_current_protection);