]> sigrok.org Git - libsigrok.git/commitdiff
zeroplus-logic-cube: Fix an issue when changing triggers.
authorUwe Hermann <redacted>
Wed, 8 Apr 2020 20:46:23 +0000 (22:46 +0200)
committerUwe Hermann <redacted>
Wed, 8 Apr 2020 20:58:02 +0000 (22:58 +0200)
Changing triggers (e.g. from low to high) would sometimes cause the
acquisition to seemingly "hang" due to missing variable initializations
(in reality the device would wait for incorrect triggers and/or on
incorrect channels).

This fixes bug #1535.

src/hardware/zeroplus-logic-cube/analyzer.c

index 2130692f589dacde768663c4d0cf7857d9127e13..0617d227467e840548a93c823678c89c0c199ca1 100644 (file)
@@ -505,6 +505,9 @@ SR_PRIV int analyzer_add_triggers(const struct sr_dev_inst *sdi)
        if (!(trigger = sr_session_trigger_get(sdi->session)))
                return SR_OK;
 
+       memset(g_trigger_status, 0, sizeof(g_trigger_status));
+       g_trigger_edge = 0;
+
        for (l = trigger->stages; l; l = l->next) {
                stage = l->data;
                for (m = stage->matches; m; m = m->next) {