mirror of
https://github.com/KevinMidboe/oled_workout_tracker.git
synced 2025-10-29 09:40:28 +00:00
DisplayCounterValue checks for changes in rotary encoder and updates screen if true.
This commit is contained in:
@@ -167,12 +167,12 @@ void displayMenu() {
|
||||
display.display();
|
||||
}
|
||||
|
||||
bool beingPressed = false;
|
||||
void changeMode() {
|
||||
if (beingPressed == true) {
|
||||
return;
|
||||
void displayCounterValue() {
|
||||
if (readEncoderAndUpdateCounter()) {
|
||||
drawPushups(counter);
|
||||
}
|
||||
delay(1);
|
||||
}
|
||||
Serial.println("CHANGING MODE");
|
||||
|
||||
int menuPos = 0;
|
||||
void displayMenuSelect() {
|
||||
@@ -186,9 +186,9 @@ void loop() {
|
||||
// displayFromSerialInput();
|
||||
|
||||
if (mode == false) {
|
||||
displayNumberWithPotValue();
|
||||
displayCounterValue();
|
||||
} else {
|
||||
displayMenuSelect();
|
||||
}
|
||||
delay(10);
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user