Add saved LED controls across supported boards
Add get leds and set leds on|off for Companion, repeater, room server and sensor builds. Preserve the setting across reboots and cover GPIO, RGB, Bluetooth, notification and expander indicators without changing radio amplifier controls or screen backlights. RAK Companions blink while advertising and keep the Bluetooth LED off once connected, including late timer callbacks. Adapted from meshcore-dev/MeshCore#3605 and #2694. Validated with host regressions and firmware builds for SenseCAP Solar, RAK4631, T096, Heltec V4, T-Beam, Xiao S3, Pico W and Wio E5 Mini. Co-authored-by: R0ck <develop@hectospark.co.uk> Co-authored-by: Nick Dunklee <nick@dunklee.org>
This commit is contained in:
1 parent
c48e679284
commit
9d52b1fd68
91 files changed
+1485
-65
No files matched your search
@@ -1958,6 +1958,33 @@ the verified pin assignments, startup fixes, and saved amplifier settings.
|
||||
|
||||
---
|
||||
|
||||
#### Turn indicator LEDs on or off
|
||||
|
||||
```text
|
||||
get leds
|
||||
set leds off
|
||||
set leds on
|
||||
```
|
||||
|
||||
Available in Companion, repeater, room-server, and sensor firmware. The setting
|
||||
is saved across reboots and defaults to `on`. `off` suppresses software-controlled
|
||||
transmit, Bluetooth, status, and notification LEDs. `on` restores their normal
|
||||
behavior; it does not leave every LED lit. A build with `DISABLE_BLE_LED` keeps
|
||||
the Bluetooth indicator disabled.
|
||||
|
||||
Supported outputs include ordinary and inverted GPIO LEDs, addressable RGB LEDs,
|
||||
and board-controlled expander LEDs on nRF52, ESP32, RP2040, and STM32 boards.
|
||||
Screen backlights and manually controlled torches keep their own controls.
|
||||
Power and charging LEDs wired directly to a charger cannot be switched off by
|
||||
firmware. Bootloader and early startup indicators may still appear before the
|
||||
saved setting is loaded.
|
||||
|
||||
This extends the SenseCAP Solar LED switch from
|
||||
[upstream PR #3605](https://github.com/meshcore-dev/MeshCore/pull/3605).
|
||||
With LEDs enabled, RAK-family Companions blink their Bluetooth LED while
|
||||
advertising and leave it off once connected, following
|
||||
[upstream PR #2694](https://github.com/meshcore-dev/MeshCore/pull/2694).
|
||||
|
||||
#### Turn WiFi, ESP-NOW, or all 2.4 GHz services on or off
|
||||
|
||||
```text
|
||||
|
||||
Reference in new issue
Block a user