Skip to content

Commit

Permalink
zeroplus-logic-cube: Fix an issue when changing triggers.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
uwehermann committed Apr 8, 2020
1 parent 88daa05 commit 148cf8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hardware/zeroplus-logic-cube/analyzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 148cf8b

Please sign in to comment.