From a11819a3188711c6d558f8d68641a95002dbe8ca Mon Sep 17 00:00:00 2001 From: Neil Hutchison Date: Mon, 8 Feb 2021 11:34:19 -0500 Subject: [PATCH] Several Bugfixes Update Voltage output to be able to be sent to any display Time override fixes to ensure state is reset correctly. Loop overide fixes to ensure state is reset correctly. --- LogicEngine.ino | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LogicEngine.ino b/LogicEngine.ino index b228090..4c615db 100644 --- a/LogicEngine.ino +++ b/LogicEngine.ino @@ -983,6 +983,8 @@ void loopsDonedoRestoreDefault(uint8_t logicDisplay) { // Set back to the default pattern lastEventCode[logicDisplay - 1] = defaultPattern; + lastEventDuration[logicDisplay - 1] = 0; + ledPatternState[logicDisplay - 1] = 0; patternRunning[logicDisplay - 1] = false; } } @@ -994,6 +996,8 @@ void globalTimerDonedoRestoreDefault(int logicDisplay) globalPatternLoops[logicDisplay - 1] = 0; // Global timeout expired, go back to default mode. lastEventCode[logicDisplay - 1] = defaultPattern; + lastEventDuration[logicDisplay - 1] = 0; + ledPatternState[logicDisplay - 1] = 0; patternRunning[logicDisplay - 1] = false; } } @@ -1791,8 +1795,8 @@ void display_power(int logicDisplay) // We set the text to the Bottom Logic, just print that. DEBUG_PRINT_LN(battery_text); - setText(FLD_BOTTOM, battery_text); - runPattern(FLD_BOTTOM, 98); + setText(logicDisplay, battery_text); + runPattern(logicDisplay, 98); }