]> sigrok.org Git - sigrok-qt.git/commitdiff
qt: Update to sr_filter_probes() API changes.
authorUwe Hermann <redacted>
Mon, 6 Aug 2012 20:45:36 +0000 (22:45 +0200)
committerUwe Hermann <redacted>
Mon, 6 Aug 2012 20:45:36 +0000 (22:45 +0200)
The sr_filter_probes() function now expects the 'probelist' argument to
be terminated with -1.

mainwindow.cpp

index afbbd318788ad92c77d8477d824968974a44cec3..cfe8340f831141116f9f7326f62d87a5a807bdd7 100644 (file)
@@ -503,7 +503,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
                struct sr_datafeed_packet *packet)
 {
        static int num_probes = 0;
-       static int logic_probelist[SR_MAX_NUM_PROBES + 1] = { 0 };
+       static int logic_probelist[SR_MAX_NUM_PROBES + 1] = { -1 };
        static uint64_t received_samples = 0;
        static int triggered = 0;
        static int unitsize = 0;
@@ -552,6 +552,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
                        if (probe->enabled)
                                logic_probelist[num_enabled_probes++] = probe->index;
                }
+               logic_probelist[num_enabled_probes] = -1;
 
                qDebug() << "Acquisition with" << num_enabled_probes << "/"
                         << num_probes << "probes at"