zeroplus-logic-cube: Fix an issue when changing triggers.

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.
This commit is contained in:
Uwe Hermann 2020-04-08 22:46:23 +02:00
parent 88daa0536c
commit 148cf8bea1
1 changed files with 3 additions and 0 deletions

View 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))) if (!(trigger = sr_session_trigger_get(sdi->session)))
return SR_OK; return SR_OK;
memset(g_trigger_status, 0, sizeof(g_trigger_status));
g_trigger_edge = 0;
for (l = trigger->stages; l; l = l->next) { for (l = trigger->stages; l; l = l->next) {
stage = l->data; stage = l->data;
for (m = stage->matches; m; m = m->next) { for (m = stage->matches; m; m = m->next) {