From a95a5cfe3e9acdb401bc00fdde5cc8016e118a11 Mon Sep 17 00:00:00 2001 From: Stefan Kremser Date: Fri, 20 Apr 2018 13:48:55 +0200 Subject: [PATCH] Fixed ButtonB --- esp8266_deauther/DisplayUI.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/esp8266_deauther/DisplayUI.cpp b/esp8266_deauther/DisplayUI.cpp index bbd473c..1803589 100644 --- a/esp8266_deauther/DisplayUI.cpp +++ b/esp8266_deauther/DisplayUI.cpp @@ -261,6 +261,10 @@ void DisplayUI::setup() { buttonB.pushed = true; buttonB.time = currentTime; scrollCounter = 0; + }; + + buttonB.release = [this]() { + if (!buttonB.pushed) return; switch(mode){ case SCREEN_MODE_MENU: @@ -272,10 +276,7 @@ void DisplayUI::setup() { mode = SCREEN_MODE_MENU; break; } - }; - - buttonB.release = [this]() { - if (!buttonB.pushed) return; + buttonB.pushed = false; };