From: Bert Vermeulen Date: Tue, 21 Jan 2014 17:19:57 +0000 (+0100) Subject: demo: Probe indexes should be unique, even if the types are different. X-Git-Tag: libsigrok-0.3.0~213 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=03aa381efbb3fe3cb3fec8e7f2229b22bae58c56;p=libsigrok.git demo: Probe indexes should be unique, even if the types are different. --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index b5b0d786..5123544a 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -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);