some fixes after first hardware-test

This commit is contained in:
Patrick Haßel 2025-08-07 20:48:03 +02:00
parent 3a151703a4
commit 4fe7d9cb81
2 changed files with 4 additions and 3 deletions

View File

@ -59,8 +59,7 @@ public:
} }
lastState = currentState; lastState = currentState;
lastMillis = currentMillis; lastMillis = currentMillis;
} } else if (lastState && duration >= 3000 && !pressedLong) {
if (lastState && duration >= 3000 && !pressedLong) {
pressedLong = true; pressedLong = true;
callback(BUTTON_PRESSED_LONG); callback(BUTTON_PRESSED_LONG);
} }

View File

@ -22,6 +22,7 @@ void setup() {
Serial.println("\n\n\nStartup!"); Serial.println("\n\n\nStartup!");
beepSetup(); beepSetup();
button.setup();
display.setup(); display.setup();
mode.init(); mode.init();
serverSetup(); serverSetup();
@ -31,6 +32,7 @@ void loop() {
stepMode(); stepMode();
readConsole(); readConsole();
wifiLoop(); wifiLoop();
button.loop();
} }
void stepMode() { void stepMode() {
@ -56,7 +58,7 @@ void buttonCallback(const ButtonEvent event) {
if (event == BUTTON_PRESSED) { if (event == BUTTON_PRESSED) {
mode.buttonOK(); mode.buttonOK();
} }
if (BUTTON_PRESSED_LONG) { if (event == BUTTON_PRESSED_LONG) {
mode.buttonESC(); mode.buttonESC();
} }
} }