feat: low-battery LED indicator (ENABLE_BATT_LED, default ON)
Blink the Pico onboard LED at 1 Hz when the connected DualSense reports PowerPercent <= 1 (i.e. <= 10%) and PowerState == Discharging. Source data is byte 52 of the BT 0x31 input report, already copied into interrupt_in_data; no new BT parsing required. The new module owns the LED only while it is actively blinking; it detects controller disconnection via stale-report timeout and steps out, so bt.cpp's existing connect/disconnect LED handling stays in charge in all other states. Honors disable_pico_led. Gated by -DENABLE_BATT_LED=ON (default). With the option off, the source file is not compiled and behavior is identical to upstream. CI gains a compile-only check for the OFF flavor. (cherry picked from commit 2f8ea73c9fb695e24e7cc3329db7cb925e82e1c9)
This commit is contained in:
@@ -57,6 +57,12 @@ The Pico device will only be visible to the system after the controller is conne
|
||||
|
||||
Some behaviors depend on reconnection cycles to take effect
|
||||
|
||||
### Low-battery LED indicator
|
||||
|
||||
When the connected DualSense reports its battery at or below 10% (and it is not charging), the Pico onboard LED switches from solid-on to a 1 Hz blink so you can see the warning at a glance. The LED returns to solid-on as soon as the controller is plugged in or its reported level rises again. The indicator respects the existing `disable_pico_led` setting (Speaker mute toggle).
|
||||
|
||||
To opt out at build time, configure with `-DENABLE_BATT_LED=OFF`. Default is ON.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- ⚠️ Audio may experience slight stuttering
|
||||
|
||||
Reference in New Issue
Block a user