Skip to content

Commit

Permalink
Refactor widget behavior for UP and DOWN commands
Browse files Browse the repository at this point in the history
Adjust widget behavior to toggle value on UP or DOWN commands instead of just ENTER command.
  • Loading branch information
forntoh committed Oct 28, 2024
1 parent bf958f0 commit fa810ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widget/WidgetBool.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WidgetBool : public BaseWidgetValue<bool> {
* @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();
Expand Down

0 comments on commit fa810ec

Please sign in to comment.