From aba4dc7c50ac2a25e15a673ff7bd7c3197657eaa Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 9 Jan 2022 15:13:58 +0100 Subject: [PATCH] Bugfix for analog button read limitation. --- wled00/button.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wled00/button.cpp b/wled00/button.cpp index 96cdfed5a..8bf1b4b06 100644 --- a/wled00/button.cpp +++ b/wled00/button.cpp @@ -210,6 +210,7 @@ void handleAnalog(uint8_t b) void handleButton() { static unsigned long lastRead = 0UL; + bool analog = false; for (uint8_t b=0; b 250) { // button is not a button but a potentiometer - if (b+1 == WLED_MAX_BUTTONS) lastRead = millis(); + analog = true; handleAnalog(b); continue; } @@ -275,6 +276,7 @@ void handleButton() shortPressAction(b); } } + if (analog) lastRead = millis(); } void handleIO()