feat: drive RGB status LED from system state (PR 4/9) - #39
Merged
Conversation
Adds the SK6812 status LED per PCB/GPIO_table.md (pin 37, RMT-driven).
Same split as the OLED work in PR 3: StatusLedController
(status_led.h/.cpp) is pure logic mapping SystemState
(booting/connected/disconnected/charging/error) to an RGB color, fully
unit tested; RgbLed (rgb_led.cpp) is a thin Adafruit_NeoPixel adapter
that just shows whatever color it's given. rgb_led.cpp joins the native
build/coverage exclusion list alongside oled.cpp.
SnipsController.ino cycles through every status color once at boot —
the bring-up check PCB/README.md's recommended order calls for ("verify
RMT output on pin 37, cycle colors") — then settles on "disconnected,"
which is accurate until the XBee link exists (PR 8). Real state
(connected/charging/error) gets wired up by later PRs once there's
something to base it on.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 4 of the firmware rewrite (PR 1: #35, PR 2: #36, PR 3: #38). Adds the SK6812 status LED per
PCB/GPIO_table.md(pin 37, RMT-driven).StatusLedController(include/status_led.h/src/status_led.cpp): pure logic mapping aSystemState(booting/connected/disconnected/charging/error) to an RGB color, fully unit tested.RgbLed(include/rgb_led.h/src/rgb_led.cpp): thinAdafruit_NeoPixeladapter — shows whatever color it's given, no state decisions. Joinsoled.cppin the native build/coverage exclusion list.SnipsController.inocycles through every status color once at boot, matching the bring-up checkPCB/README.md's recommended order calls for ("verify RMT output on pin 37, cycle colors"), then settles on "disconnected" — accurate for now since the XBee link doesn't exist until PR 8. Real state (connected/charging/error) gets wired up once there's something to base it on.Test plan
pio test -e native— all 30 test cases passgcovr --exclude 'src/SnipsController\.ino' --exclude 'src/oled\.cpp' --exclude 'src/rgb_led\.cpp' --fail-under-line 90— 100% across all logic filespio run -e esp32s3— builds successfully, Adafruit NeoPixel lib resolves and links🤖 Generated with Claude Code