]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-6xxx/api.c
hantek-6xxx: Only list DC coupling once.
[libsigrok.git] / src / hardware / hantek-6xxx / api.c
index c05290be6e9ab460b36813740c13b22a62b8e1c2..08062add77ec07424012d6a6a78d490d23c63b62 100644 (file)
@@ -52,7 +52,7 @@ static const char *channel_names[] = {
 };
 
 static const char *dc_coupling[] = {
-       "DC", "DC",
+       "DC",
 };
 
 static const char *acdc_coupling[] = {
@@ -385,7 +385,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
                        *data = g_variant_new("(tt)", vdiv[0], vdiv[1]);
                        break;
                case SR_CONF_COUPLING:
-                       *data = g_variant_new_string(devc->coupling_vals[devc->coupling[ch_idx]]);
+                       *data = g_variant_new_string((devc->coupling[ch_idx] \
+                                       == COUPLING_DC) ? "DC" : "AC");
                        break;
                }
        }