some fixes after first hardware-test
This commit is contained in:
parent
3a151703a4
commit
4fe7d9cb81
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user