From 5876b0028552c9e476ed44c0c23796a2c6a86a81 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 3 Sep 2023 06:46:42 +0200 Subject: [PATCH] Fix: Actually Register SW14 for button press events SW14 has never been registered for button press events. The loop ignores it, because it's missing the last iteration. This was most likely a copy & paste mistake from the TEST_MODE code below where SW14 is handled specially and not by a loop iterating over all buttons. --- Firmware/CoverUI_V2/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/CoverUI_V2/src/main.cpp b/Firmware/CoverUI_V2/src/main.cpp index e945e0a..b3a23c2 100644 --- a/Firmware/CoverUI_V2/src/main.cpp +++ b/Firmware/CoverUI_V2/src/main.cpp @@ -213,7 +213,7 @@ void setup() { } #ifndef TEST_MODE - for (int i = 0; i < 13; ++i) { + for (int i = 0; i < 14; ++i) { SW[i].onPress([](int idx, int v, int up) { // v is 0 for release, 1-2-3 for press length if (v > 0) @@ -268,4 +268,4 @@ void loop() { // user-defined packet to the sender. Serial.println("Overflow!"); } -} \ No newline at end of file +}