Fix T114 long press

This commit is contained in:
Steve Calvário
2026-05-20 17:16:12 +01:00
parent 65311f0ea9
commit f7f1603536
5 changed files with 34 additions and 1 deletions
+15
View File
@@ -333,6 +333,21 @@ if(ZEPHCORE_BOARD_OVERLAY AND EXISTS ${ZEPHCORE_BOARD_OVERLAY})
endif()
endif()
# Auto-pair: for each .conf in EXTRA_CONF_FILE, if a same-named .overlay exists
# next to it, include it automatically (e.g. no_display.conf → no_display.overlay).
if(EXTRA_CONF_FILE)
foreach(_conf IN LISTS EXTRA_CONF_FILE)
string(REPLACE ".conf" ".overlay" _paired_overlay "${_conf}")
if(EXISTS "${_paired_overlay}")
if(EXTRA_DTC_OVERLAY_FILE)
set(EXTRA_DTC_OVERLAY_FILE "${EXTRA_DTC_OVERLAY_FILE};${_paired_overlay}" CACHE STRING "" FORCE)
else()
set(EXTRA_DTC_OVERLAY_FILE "${_paired_overlay}" CACHE STRING "" FORCE)
endif()
endif()
endforeach()
endif()
# Debug: Show what configs are being used
message(STATUS "ZephCore config hierarchy:")
message(STATUS " Common: ${ZEPHCORE_COMMON_CONF}")
@@ -29,3 +29,7 @@ CONFIG_HEAP_MEM_POOL_SIZE=6144
# 1.14" 240×135 TFT - the default 6×8 font is illegible at this pixel density.
# Switch to the smallest Zephyr built-in CFB font >= 16 px tall (typically 10×16).
CONFIG_ZEPHCORE_DISPLAY_LARGE_FONT=y
# Long-press emits KEY_ENTER (1000ms hold), so two confirms + release gap
# do not fit in the default 500ms window. Like T-Echo / ThinkNode M1.
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000
@@ -50,7 +50,7 @@
input = <&buttons>;
input-codes = <INPUT_KEY_0>;
short-codes = <INPUT_KEY_A>;
long-codes = <INPUT_KEY_POWER>;
long-codes = <INPUT_KEY_ENTER>;
long-delay-ms = <1000>;
};
@@ -3,6 +3,9 @@
# Pass via -DEXTRA_CONF_FILE when building for units without the TFT module.
# TFT panel VDD (P0.03) stays off for the entire session.
#
# no_display.overlay (long-press => deep sleep) is auto-included by CMakeLists.txt
# whenever this file is in EXTRA_CONF_FILE their is no need to pass it separately.
#
# west build -b heltec_t114 zephcore --pristine -- \
# -DEXTRA_CONF_FILE="boards/common/prod.conf;boards/nrf52840/heltec_t114/no_display.conf"
@@ -0,0 +1,11 @@
/*
* Heltec T114 - screenless build overlay
*
* Restores long-press => KEY_POWER (deep sleep) for headless units.
* The display variant uses KEY_ENTER (action_page_enter)
* Without a display there are no pages to enter, so KEY_POWER is more useful.
*/
&user_btn_longpress {
long-codes = <INPUT_KEY_POWER>;
};