mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Bug fix for BacklightOnSelect
This commit is contained in:
parent
1a1d3079c0
commit
26ec45a659
@ -321,11 +321,22 @@ int FreetronicsLCD::getButton()
|
|||||||
prevButton = button;
|
prevButton = button;
|
||||||
if (screenSaved) {
|
if (screenSaved) {
|
||||||
// Button pressed when screen saver active.
|
// Button pressed when screen saver active.
|
||||||
|
if (mode == BacklightOnSelect) {
|
||||||
|
// Turn on the back light only if Select was pressed.
|
||||||
|
if (button == LCD_BUTTON_SELECT) {
|
||||||
|
digitalWrite(LCD_BACK_LIGHT, HIGH);
|
||||||
|
screenSaved = false;
|
||||||
|
}
|
||||||
|
} else if (mode == DisplayOff) {
|
||||||
display();
|
display();
|
||||||
if (mode == DisplayOff) {
|
|
||||||
eatRelease = true;
|
eatRelease = true;
|
||||||
return LCD_BUTTON_NONE;
|
return LCD_BUTTON_NONE;
|
||||||
|
} else {
|
||||||
|
display();
|
||||||
}
|
}
|
||||||
|
} else if (mode == BacklightOnSelect && button != LCD_BUTTON_SELECT) {
|
||||||
|
eatRelease = false;
|
||||||
|
return button;
|
||||||
}
|
}
|
||||||
eatRelease = false;
|
eatRelease = false;
|
||||||
lastRestore = currentTime;
|
lastRestore = currentTime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user