diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 30ad512..bb3829a 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -979,6 +979,11 @@ Single button; tap-count → key-code mapping comes from the board's devicetree - 4 taps → GPS toggle - 5 taps → Flood advert (immediate, no delay) +Boards with a display also map a 1 s hold to `KEY_ENTER` (a `zephyr,input-longpress` filter), which runs the item on +the page. Offgrid, DFU and Power Off act on a second ENTER inside `CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS`. The default +of 500 ms is for a direct-tap ENTER; a board whose ENTER is a long press must set 3000 in its `board.conf`, or the +confirmation can never be given. + ### 8.4 Buzzer and vibration Non-blocking RTTTL parser on dedicated work queue. Predefined melodies for startup, shutdown, messages, ACKs. 2-second safety watchdog auto-silences on work queue stall. diff --git a/releasenotes/RELEASE_NOTES_1.17.8-zephcore.md b/releasenotes/RELEASE_NOTES_1.17.8-zephcore.md new file mode 100644 index 0000000..de81a0a --- /dev/null +++ b/releasenotes/RELEASE_NOTES_1.17.8-zephcore.md @@ -0,0 +1,34 @@ +# ZephCore 1.17.8-zephcore + +Button fixes on four boards with a display: the Station G2's button now drives the pages, and +Power Off, DFU and Offgrid can be confirmed on the Heltec Mesh Node T1 and both LR2021 LoRa Plus EVK +kits. + +> [!NOTE] +> A normal upgrade keeps your identity, settings, contacts and phone pairing. + +--- + +## Station G2: the user button drives the display + +Until now a press of the user button only woke the display: the pages could not be turned, and +nothing on them could be run. The button now works as on the other one-button boards: + +- **one press**: next page, +- **two presses**: previous page, +- **hold for one second**: run the item on the page (Bluetooth on/off, send an advert, GPS on/off, + and so on). + +Offgrid, DFU and Power Off ask for confirmation: hold the button again within 3 seconds. + +Reports of how it behaves on your Station G2 are welcome. + +## Heltec Mesh Node T1 and LR2021 LoRa Plus EVK: Power Off, DFU and Offgrid can be confirmed + +On these boards Power Off, DFU and Offgrid could not be confirmed from the display. The confirmation +is a second long press of the user button, and it was accepted only within half a second of the +first, which a long press cannot meet: every long press asked for the confirmation again. It now has +3 seconds, as on the other one-button boards. + +The confirmation is a second **hold**. A short press pages on instead, which on the Power Off page +goes back to the first page. diff --git a/zephcore/boards/esp32/station_g2/board.conf b/zephcore/boards/esp32/station_g2/board.conf index fdccb57..9186985 100644 --- a/zephcore/boards/esp32/station_g2/board.conf +++ b/zephcore/boards/esp32/station_g2/board.conf @@ -24,3 +24,7 @@ CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y # PSRAM mode — ESP32-S3R8 is silicon-strapped OPI octal. # Enable is auto-detected from DTS by Kconfig.psram; only the mode is set here. CONFIG_SPIRAM_MODE_OCT=y + +# ENTER is a 1 s long press of the user button: two of them do not fit in the +# default 500 ms confirmation window. +CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000 diff --git a/zephcore/boards/esp32/station_g2/board.overlay b/zephcore/boards/esp32/station_g2/board.overlay index e30cf27..c4d60d3 100644 --- a/zephcore/boards/esp32/station_g2/board.overlay +++ b/zephcore/boards/esp32/station_g2/board.overlay @@ -34,9 +34,26 @@ * defined: it is also a light-sleep wake pin. */ gpios = <&gpio1 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* GPIO38 = gpio1 pin 6 */ label = "User Button"; - zephyr,code = ; + zephyr,code = ; }; }; + + /* Button chain — same mapping as RAK4631 / WisMesh Pocket (rak4631/board.overlay). */ + user_btn_longpress { + compatible = "zephyr,input-longpress"; + input = <&buttons>; + input-codes = ; + short-codes = ; + long-codes = ; + long-delay-ms = <1000>; + }; + + page_btn_multitap { + compatible = "zephcore,input-multi-tap"; + input-codes = ; + tap-codes = ; + tap-delay-ms = <400>; + }; }; /* SX1262 + PA on SPI2 */ diff --git a/zephcore/boards/nrf52840/heltec_t1/README.md b/zephcore/boards/nrf52840/heltec_t1/README.md index eda0c30..40caca1 100644 --- a/zephcore/boards/nrf52840/heltec_t1/README.md +++ b/zephcore/boards/nrf52840/heltec_t1/README.md @@ -167,6 +167,9 @@ backwards. | | | hold 1 s | page enter | | Function (S2) | P0.14 | press | page previous | +Offgrid, DFU and Power Off ask for confirmation: hold the user button again +within 3 s. A tap instead pages on. + The datasheet calls P1.10 "Button1 / USER key" and P0.14 "Button2 / Function key"; the schematic silkscreen labels are the other way round (S2 = "User1" on P0.14, S3 = "User2" on P1.10). Pins are what matter. diff --git a/zephcore/boards/nrf52840/heltec_t1/board.conf b/zephcore/boards/nrf52840/heltec_t1/board.conf index c89d47d..c8567c7 100644 --- a/zephcore/boards/nrf52840/heltec_t1/board.conf +++ b/zephcore/boards/nrf52840/heltec_t1/board.conf @@ -35,3 +35,7 @@ CONFIG_ZEPHCORE_SD_FWID=0x00B6 # CFB mono-tft framebuffer = 160x80/8 = 1600 bytes, allocated from k_malloc. # Default heap (2048) is sized tightly for SSD1306 128x64 (1024 bytes). CONFIG_HEAP_MEM_POOL_SIZE=4096 + +# ENTER is a 1 s long press of the user button: two of them do not fit in the +# default 500 ms confirmation window. +CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000 diff --git a/zephcore/boards/nrf54l/seeed_lr2021_evk/board.conf b/zephcore/boards/nrf54l/seeed_lr2021_evk/board.conf index 31a3d9c..bbcedfb 100644 --- a/zephcore/boards/nrf54l/seeed_lr2021_evk/board.conf +++ b/zephcore/boards/nrf54l/seeed_lr2021_evk/board.conf @@ -14,3 +14,7 @@ CONFIG_ZEPHCORE_RADIO_LR2021=y # still fits. This board additionally carries the OLED UI, so if RAM gets tight # this is the first knob to turn. CONFIG_ZEPHCORE_MAX_CONTACTS=450 + +# ENTER is a 1 s long press of the user button: two of them do not fit in the +# default 500 ms confirmation window. +CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000 diff --git a/zephcore/boards/nrf54l/seeed_lr2021_evk_lm20a/board.conf b/zephcore/boards/nrf54l/seeed_lr2021_evk_lm20a/board.conf index b52d742..8b82474 100644 --- a/zephcore/boards/nrf54l/seeed_lr2021_evk_lm20a/board.conf +++ b/zephcore/boards/nrf54l/seeed_lr2021_evk_lm20a/board.conf @@ -20,3 +20,7 @@ CONFIG_ZEPHCORE_OFFLINE_QUEUE_SIZE=512 # layout, and the SPI NOR driver's default page is the 64 KB block, not the # 4 KB sector (the QSPI driver's equivalent is set in nrf52_common.conf). CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +# ENTER is a 1 s long press of the user button: two of them do not fit in the +# default 500 ms confirmation window. +CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000