Fix color cycling when idle

This commit is contained in:
sanni 2024-07-02 11:35:51 +02:00
parent 59f2525f80
commit 9b69037ebc

View File

@ -2814,7 +2814,7 @@ unsigned char questionBox_Display(const __FlashStringHelper* question, char answ
// Attract Mode
if (millis() - idleTime > 300000) {
if ((millis() - idleTime) % 4000 == 0) {
if (currentColor < 7) {
if (currentColor < 5) {
currentColor++;
if (currentColor == 1) {
currentColor = 2; // skip red as that signifies an error to the user
@ -2822,9 +2822,9 @@ unsigned char questionBox_Display(const __FlashStringHelper* question, char answ
} else {
currentColor = 0;
}
}
rgbLed(currentColor);
}
}
/* Check Button/rotary encoder
1 click/clockwise rotation