From fa810ec604cf18da6fac4be96b01e720f60af837 Mon Sep 17 00:00:00 2001 From: forntoh Date: Tue, 29 Oct 2024 00:14:24 +0100 Subject: [PATCH] Refactor widget behavior for UP and DOWN commands Adjust widget behavior to toggle value on UP or DOWN commands instead of just ENTER command. --- src/widget/WidgetBool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/WidgetBool.h b/src/widget/WidgetBool.h index b952884b..9f4864ad 100644 --- a/src/widget/WidgetBool.h +++ b/src/widget/WidgetBool.h @@ -41,7 +41,7 @@ class WidgetBool : public BaseWidgetValue { * @return true if command was handled, false otherwise */ bool process(LcdMenu* menu, const unsigned char command) override { - if (command == ENTER) { + if (command == UP || command == DOWN) { value = !value; LOG(F("WidgetToggle::toggle"), value); handleChange();