From 64d4b2982b55cc25fd641dc7f26a746d1fc132c9 Mon Sep 17 00:00:00 2001 From: MarekZegare4 Date: Fri, 14 Aug 2026 01:07:06 +0200 Subject: [PATCH] fix(ui): wake display on T-Echo KeyShield Home key, drop dead code Home key toggles the keyboard backlight but wasn't going through checkDisplayOn() like every other TCA8418 key, so it couldn't wake a sleeping display or extend the auto-off timer. Also: removed a no-op #elif branch in ST7789Display.cpp (same values as the #else it duplicated), and ENABLE_SCREENSHOT on the Cardputer ADV solo env, which does nothing since ST7789Display has no getBuffer(). --- examples/companion_radio/ui-new/UITask.cpp | 1 + src/helpers/ui/ST7789Display.cpp | 5 +---- variants/m5stack_cardputer_adv/platformio.ini | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index e4fb877b..01807d86 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -2346,6 +2346,7 @@ void UITask::loop() { case KEY_DOWN: enqueueKey(checkDisplayOn(KEY_DOWN)); break; case KEY_CANCEL:enqueueKey(checkDisplayOn(KEY_CANCEL));break; case KEY_HOME: + checkDisplayOn(k); // wake/extend same as every other key here, even though Home has no nav action #ifdef LILYGO_TECHO_LITE_KEYSHIELD extern void techo_keyshield_backlight_toggle(); techo_keyshield_backlight_toggle(); diff --git a/src/helpers/ui/ST7789Display.cpp b/src/helpers/ui/ST7789Display.cpp index 0b8eacdd..d10a6a6b 100644 --- a/src/helpers/ui/ST7789Display.cpp +++ b/src/helpers/ui/ST7789Display.cpp @@ -18,11 +18,8 @@ #ifdef HELTEC_VISION_MASTER_T190 #define SCALE_X 2.5f // 320 / 128 #define SCALE_Y 2.65625f // 170 / 64 -#elif defined(CARDPUTER_ADV) - #define SCALE_X 1.875f // 240 / 128 - #define SCALE_Y 2.109375f // 135 / 64 #else - #define SCALE_X 1.875f // 240 / 128 + #define SCALE_X 1.875f // 240 / 128 -- also Cardputer ADV's panel, same resolution #define SCALE_Y 2.109375f // 135 / 64 #endif diff --git a/variants/m5stack_cardputer_adv/platformio.ini b/variants/m5stack_cardputer_adv/platformio.ini index 8d0e499a..465dedbb 100644 --- a/variants/m5stack_cardputer_adv/platformio.ini +++ b/variants/m5stack_cardputer_adv/platformio.ini @@ -110,7 +110,6 @@ build_flags = -D FIRMWARE_SOLO_BUILD=1 -D MESHCORE_VERSION='"1.17"' -D UI_SENSORS_PAGE=1 - -D ENABLE_SCREENSHOT ; misc-fixed 6x9 font (full Latin/Greek/Cyrillic), same as the Wio L1/Heltec ; solo builds. Solo only: it costs ~14 KB of flash, and this board's own ; QWERTY keyboard is exactly the case that benefits from typing those