]> sigrok.org Git - libsigrok.git/commitdiff
demo: Probe indexes should be unique, even if the types are different.
authorBert Vermeulen <redacted>
Tue, 21 Jan 2014 17:19:57 +0000 (18:19 +0100)
committerBert Vermeulen <redacted>
Tue, 21 Jan 2014 17:19:57 +0000 (18:19 +0100)
hardware/demo/demo.c

index b5b0d786c064b9081089528d139ea0cbe7abfd16..5123544a5ede45bee7bb8b2f4663dad6f06e4a43 100644 (file)
@@ -324,7 +324,8 @@ static GSList *scan(GSList *options)
        /* Analog probes, probe groups and pattern generators. */
        for (i = 0; i < num_analog_probes; i++) {
                sprintf(probe_name, "A%d", i);
-               if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, probe_name)))
+               if (!(probe = sr_probe_new(i + num_logic_probes,
+                               SR_PROBE_ANALOG, TRUE, probe_name)))
                        return NULL;
                sdi->probes = g_slist_append(sdi->probes, probe);