X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-6xxx%2Fapi.c;h=08062add77ec07424012d6a6a78d490d23c63b62;hb=eac48b34917cf19c2b5ba52ccea85ec94bb5830f;hp=fb755f1ce10bf0928eb96e2472b54677d22fc558;hpb=8662130615d7a59883c303914f94377032101cb9;p=libsigrok.git diff --git a/src/hardware/hantek-6xxx/api.c b/src/hardware/hantek-6xxx/api.c index fb755f1c..08062add 100644 --- a/src/hardware/hantek-6xxx/api.c +++ b/src/hardware/hantek-6xxx/api.c @@ -52,7 +52,7 @@ static const char *channel_names[] = { }; static const char *dc_coupling[] = { - "DC", "DC", + "DC", }; static const char *acdc_coupling[] = { @@ -120,6 +120,7 @@ static struct sr_dev_inst *hantek_6xxx_dev_new(const struct hantek_6xxx_profile } devc->coupling_vals = prof->coupling_vals; devc->coupling_tab_size = prof->coupling_tab_size; + devc->has_coupling = prof->has_coupling; devc->sample_buf = NULL; devc->sample_buf_write = 0; @@ -384,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; } }