Skip to content

ThinkNode M5: hold backlight button to toggle backlight on/off - #4000

Open
shinsterneck wants to merge 3 commits into
meshcore-dev:devfrom
shinsterneck:feature/m5-backlight-toggle
Open

shinsterneck wants to merge 3 commits into
meshcore-dev:devfrom
shinsterneck:feature/m5-backlight-toggle

Conversation

@shinsterneck

Copy link
Copy Markdown

Summary

  • Toggle: holding BUTTON2 for 1 s latches the backlight on ("Backlight: always on" alert). Holding again returns to auto ("Backlight: auto") and switches it off immediately. While latched, ui.backlight_delay is ignored.
  • Clears automatically: the latch is cleared on display auto-off, on triple-click (display off) and on shutdown, so the backlight can't stay lit through power-off.
  • Pull-up fix: the M5's BUTTON2 (GPIO14) now has its internal pull-up enabled. Without it the pin can float and read as pressed, which kept the backlight on.
  • Other boards: the toggle lives in the shared companion-new UI, so the M8, M1 and T-Echo get the long-press toggle too. Their existing behaviour (hold to light, double-click refresh, triple-click off) is otherwise unchanged.

Testing

  • Tested on hardware: ThinkNode M5 (ThinkNode_M5_companion_radio_ble)
  • Builds checked: ThinkNode_M5_companion_radio_ble, ThinkNode_M8_companion_radio_ble, Heltec_v3_companion_radio_ble

Shin Sterneck added 3 commits November 29, 2026 17:55
Long-pressing BACKLIGHT_BTN (1 s) now latches the backlight on; a second
long press releases it. While latched, the backlight ignores
ui.backlight_delay. The latch is cleared on display auto-off, on
triple-click (display off) and on shutdown, so the backlight pin does
not stay lit through power-off.

Existing behaviour is unchanged: the backlight still lights while the
button is held, and double-click still forces a full e-ink refresh.
BUTTON2 (GPIO14) is active low and needs a pull-up. Without it the pin
can float and read as pressed, keeping the backlight on permanently.
Show a short "Backlight: always on" / "Backlight: auto" alert when the
long press toggles the latch.

When the latch is released, keep the backlight dark until the button is
let go. Previously the still-held button re-lit it and restarted the
ui.backlight_delay timer, so it flickered and stayed on a few more
seconds.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant