mirror of
https://github.com/KevinMidboe/oled_workout_tracker.git
synced 2025-10-29 17:50: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();
|
display.display();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool beingPressed = false;
|
void displayCounterValue() {
|
||||||
void changeMode() {
|
if (readEncoderAndUpdateCounter()) {
|
||||||
if (beingPressed == true) {
|
drawPushups(counter);
|
||||||
return;
|
}
|
||||||
|
delay(1);
|
||||||
}
|
}
|
||||||
Serial.println("CHANGING MODE");
|
|
||||||
|
|
||||||
int menuPos = 0;
|
int menuPos = 0;
|
||||||
void displayMenuSelect() {
|
void displayMenuSelect() {
|
||||||
@@ -186,9 +186,9 @@ void loop() {
|
|||||||
// displayFromSerialInput();
|
// displayFromSerialInput();
|
||||||
|
|
||||||
if (mode == false) {
|
if (mode == false) {
|
||||||
displayNumberWithPotValue();
|
displayCounterValue();
|
||||||
} else {
|
} else {
|
||||||
displayMenuSelect();
|
displayMenuSelect();
|
||||||
}
|
}
|
||||||
delay(10);
|
checkButtonState();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user