mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 03:49:55 +00:00
button fixes
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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 = <INPUT_BTN_0>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
/* Button chain — same mapping as RAK4631 / WisMesh Pocket (rak4631/board.overlay). */
|
||||
user_btn_longpress {
|
||||
compatible = "zephyr,input-longpress";
|
||||
input = <&buttons>;
|
||||
input-codes = <INPUT_KEY_0>;
|
||||
short-codes = <INPUT_KEY_A>;
|
||||
long-codes = <INPUT_KEY_ENTER>;
|
||||
long-delay-ms = <1000>;
|
||||
};
|
||||
|
||||
page_btn_multitap {
|
||||
compatible = "zephcore,input-multi-tap";
|
||||
input-codes = <INPUT_KEY_A>;
|
||||
tap-codes = <INPUT_KEY_1 INPUT_KEY_LEFT>;
|
||||
tap-delay-ms = <400>;
|
||||
};
|
||||
};
|
||||
|
||||
/* SX1262 + PA on SPI2 */
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user