DisplayCounterValue checks for changes in rotary encoder and updates screen if true.

This commit is contained in:
2020-08-13 21:53:15 +02:00
parent d160ecbfbb
commit 5d00a2817b

View File

@@ -167,12 +167,12 @@ void displayMenu() {
display.display();
}
bool beingPressed = false;
void changeMode() {
if (beingPressed == true) {
return;
void displayCounterValue() {
if (readEncoderAndUpdateCounter()) {
drawPushups(counter);
}
Serial.println("CHANGING MODE");
delay(1);
}
int menuPos = 0;
void displayMenuSelect() {
@@ -186,9 +186,9 @@ void loop() {
// displayFromSerialInput();
if (mode == false) {
displayNumberWithPotValue();
displayCounterValue();
} else {
displayMenuSelect();
}
delay(10);
checkButtonState();
}