]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: Fix coupling selection.
authorUwe Hermann <redacted>
Tue, 16 May 2017 20:23:24 +0000 (22:23 +0200)
committerUwe Hermann <redacted>
Tue, 16 May 2017 20:23:24 +0000 (22:23 +0200)
Due to an uninitialized variable, switching to/from AC/DC coupling
(on models that support this) was not working.

This fixes bug #836.

src/hardware/hantek-6xxx/api.c

index fb755f1ce10bf0928eb96e2472b54677d22fc558..c05290be6e9ab460b36813740c13b22a62b8e1c2 100644 (file)
@@ -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;