mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-15 01:15:06 +01:00
Fix color cycling when idle
This commit is contained in:
parent
59f2525f80
commit
9b69037ebc
@ -2814,7 +2814,7 @@ unsigned char questionBox_Display(const __FlashStringHelper* question, char answ
|
|||||||
// Attract Mode
|
// Attract Mode
|
||||||
if (millis() - idleTime > 300000) {
|
if (millis() - idleTime > 300000) {
|
||||||
if ((millis() - idleTime) % 4000 == 0) {
|
if ((millis() - idleTime) % 4000 == 0) {
|
||||||
if (currentColor < 7) {
|
if (currentColor < 5) {
|
||||||
currentColor++;
|
currentColor++;
|
||||||
if (currentColor == 1) {
|
if (currentColor == 1) {
|
||||||
currentColor = 2; // skip red as that signifies an error to the user
|
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 {
|
} else {
|
||||||
currentColor = 0;
|
currentColor = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
rgbLed(currentColor);
|
rgbLed(currentColor);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check Button/rotary encoder
|
/* Check Button/rotary encoder
|
||||||
1 click/clockwise rotation
|
1 click/clockwise rotation
|
||||||
|
Loading…
Reference in New Issue
Block a user