From: Uwe Hermann Date: Wed, 8 Apr 2020 20:46:23 +0000 (+0200) Subject: zeroplus-logic-cube: Fix an issue when changing triggers. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=148cf8bea1687b73d2be40e7c7d89d3419856160;p=libsigrok.git 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. --- diff --git a/src/hardware/zeroplus-logic-cube/analyzer.c b/src/hardware/zeroplus-logic-cube/analyzer.c index 2130692f..0617d227 100644 --- a/src/hardware/zeroplus-logic-cube/analyzer.c +++ b/src/hardware/zeroplus-logic-cube/analyzer.c @@ -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) {