Fix: Enable touch-to-backlight on T-Echo (not just T-Echo Plus) (#9953)
The touch-to-backlight feature was gated behind TTGO_T_ECHO_PLUS, but the regular T-Echo has the same backlight pin (PIN_EINK_EN, P1.11). This changes the guard to use PIN_EINK_EN only, so any device with an e-ink backlight pin gets the feature. Fixes #7630 Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
committed by
Ben Meadors
co-authored by
Ben Meadors
parent
e30294b6da
commit
8fa5b4f7ce
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#if defined(BUTTON_PIN_TOUCH)
|
#if defined(BUTTON_PIN_TOUCH)
|
||||||
ButtonThread *TouchButtonThread = nullptr;
|
ButtonThread *TouchButtonThread = nullptr;
|
||||||
#if defined(TTGO_T_ECHO_PLUS) && defined(PIN_EINK_EN)
|
#if defined(PIN_EINK_EN)
|
||||||
static bool touchBacklightWasOn = false;
|
static bool touchBacklightWasOn = false;
|
||||||
static bool touchBacklightActive = false;
|
static bool touchBacklightActive = false;
|
||||||
#endif
|
#endif
|
||||||
@@ -220,8 +220,8 @@ void InputBroker::Init()
|
|||||||
};
|
};
|
||||||
touchConfig.singlePress = INPUT_BROKER_NONE;
|
touchConfig.singlePress = INPUT_BROKER_NONE;
|
||||||
touchConfig.longPress = INPUT_BROKER_BACK;
|
touchConfig.longPress = INPUT_BROKER_BACK;
|
||||||
#if defined(TTGO_T_ECHO_PLUS) && defined(PIN_EINK_EN)
|
#if defined(PIN_EINK_EN)
|
||||||
// On T-Echo Plus the touch pad should only drive the backlight, not UI navigation/sounds
|
// Touch pad drives the backlight on devices with e-ink backlight pin
|
||||||
touchConfig.longPress = INPUT_BROKER_NONE;
|
touchConfig.longPress = INPUT_BROKER_NONE;
|
||||||
touchConfig.suppressLeadUpSound = true;
|
touchConfig.suppressLeadUpSound = true;
|
||||||
touchConfig.onPress = []() {
|
touchConfig.onPress = []() {
|
||||||
|
|||||||
Reference in New Issue
Block a user