mirror of
https://github.com/pelgraine/Meck.git
synced 2026-03-28 17:42:44 +01:00
tdpro - reduce occurrences of slow key responsiveness on boot
This commit is contained in:
@@ -52,7 +52,7 @@ bool GxEPDDisplay::begin() {
|
||||
|
||||
void GxEPDDisplay::turnOn() {
|
||||
if (!_init) begin();
|
||||
#if defined(DISP_BACKLIGHT) && !defined(BACKLIGHT_BTN)
|
||||
#if defined(DISP_BACKLIGHT) && !defined(BACKLIGHT_BTN) && !defined(LilyGo_TDeck_Pro)
|
||||
digitalWrite(DISP_BACKLIGHT, HIGH);
|
||||
#elif defined(EXP_PIN_BACKLIGHT) && !defined(BACKLIGHT_BTN)
|
||||
expander.digitalWrite(EXP_PIN_BACKLIGHT, HIGH);
|
||||
@@ -61,12 +61,17 @@ void GxEPDDisplay::turnOn() {
|
||||
}
|
||||
|
||||
void GxEPDDisplay::turnOff() {
|
||||
#if defined(DISP_BACKLIGHT) && !defined(BACKLIGHT_BTN)
|
||||
#if defined(DISP_BACKLIGHT) && !defined(BACKLIGHT_BTN) && !defined(LilyGo_TDeck_Pro)
|
||||
// Only toggle backlight on boards that actually have one.
|
||||
// T-Deck Pro defines DISP_BACKLIGHT (GPIO 45) but has no physical backlight —
|
||||
// setting _isOn=false would stop the render loop, making the device appear frozen.
|
||||
digitalWrite(DISP_BACKLIGHT, LOW);
|
||||
_isOn = false;
|
||||
#elif defined(EXP_PIN_BACKLIGHT) && !defined(BACKLIGHT_BTN)
|
||||
expander.digitalWrite(EXP_PIN_BACKLIGHT, LOW);
|
||||
#endif
|
||||
_isOn = false;
|
||||
#endif
|
||||
// T-Deck Pro: _isOn stays true — e-ink has no backlight, render loop must keep running
|
||||
}
|
||||
|
||||
void GxEPDDisplay::clear() {
|
||||
|
||||
Reference in New Issue
Block a user