This commit is contained in:
liquidraver
2026-05-20 21:08:27 +02:00
5 changed files with 37 additions and 2 deletions
+17
View File
@@ -369,6 +369,23 @@ 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).
# Relative paths are resolved against CMAKE_CURRENT_SOURCE_DIR (the app source dir).
if(EXTRA_CONF_FILE)
foreach(_conf IN LISTS EXTRA_CONF_FILE)
get_filename_component(_abs_conf "${_conf}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
string(REPLACE ".conf" ".overlay" _abs_overlay "${_abs_conf}")
if(EXISTS "${_abs_overlay}")
if(EXTRA_DTC_OVERLAY_FILE)
set(EXTRA_DTC_OVERLAY_FILE "${EXTRA_DTC_OVERLAY_FILE};${_abs_overlay}" CACHE STRING "" FORCE)
else()
set(EXTRA_DTC_OVERLAY_FILE "${_abs_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
@@ -45,12 +45,12 @@
};
/* Input filter: user button long-press detection (1000ms) */
user_btn_longpress {
user_btn_longpress: user_btn_longpress {
compatible = "zephyr,input-longpress";
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>;
};