|
@@ -115,15 +115,17 @@ uint8_t TouchButtons::read_buttons() {
|
115
|
115
|
#if HAS_TOUCH_SLEEP
|
116
|
116
|
|
117
|
117
|
void TouchButtons::sleepTimeout() {
|
118
|
|
- #if PIN_EXISTS(TFT_BACKLIGHT)
|
119
|
|
- OUT_WRITE(TFT_BACKLIGHT_PIN, LOW);
|
|
118
|
+ #if HAS_LCD_BRIGHTNESS
|
|
119
|
+ ui.set_brightness(0);
|
|
120
|
+ #elif PIN_EXISTS(TFT_BACKLIGHT)
|
|
121
|
+ WRITE(TFT_BACKLIGHT_PIN, LOW);
|
120
|
122
|
#endif
|
121
|
123
|
next_sleep_ms = TSLP_SLEEPING;
|
122
|
124
|
}
|
123
|
125
|
void TouchButtons::wakeUp() {
|
124
|
126
|
if (isSleeping()) {
|
125
|
127
|
#if HAS_LCD_BRIGHTNESS
|
126
|
|
- ui._set_brightness();
|
|
128
|
+ ui.set_brightness(ui.brightness);
|
127
|
129
|
#elif PIN_EXISTS(TFT_BACKLIGHT)
|
128
|
130
|
WRITE(TFT_BACKLIGHT_PIN, HIGH);
|
129
|
131
|
#endif
|