Skip to content

Status LED implementation with no dependencies - #151

Merged
JanPetterMG merged 2 commits into
mainfrom
chore/status-led-refactor
Nov 24, 2026
Merged

JanPetterMG merged 2 commits into
mainfrom
chore/status-led-refactor

Conversation

@JanPetterMG

Copy link
Copy Markdown
Contributor

Refactor the StatusHandler to eliminate reliance on the FastLED library, replacing it with a custom color structure and direct GPIO manipulation for LED control. This change simplifies the code and enhances maintainability.

@JanPetterMG JanPetterMG added this to the v1.0.3 milestone Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • Improvements
    • Status indicator colors are now sent through the RGB LED interface, with color channels handled in the expected order.
    • Timed fading now dims each color channel independently, providing smoother transitions as the indicator changes.

Walkthrough

The ESP32 status handler replaces FastLED color state and output with an RGB color value and ordered LED writes. It updates color setters and fade behavior. The PlatformIO configuration removes the FastLED dependency and changes the project description.

Changes

Status LED handling

Layer / File(s) Summary
RGB color state and setters
include/esp/StatusHandler.h, src/esp/StatusHandler.cpp
The handler stores color as red, green, and blue channels. Its color setters use named color values and RGB fields.
LED output and fade updates
src/esp/StatusHandler.cpp, platformio.ini
The handler writes pending colors to the LED with GRB ordering and decrements nonzero channels during fading. The project configuration removes FastLED and updates the project description.

Change: Refactor

Merge Risk: Minimal · up to 98c9f

The change replaces FastLED with direct RGB LED writes and keeps the same color and fade behavior. No concrete merge-blocking problem was identified. Testing on target hardware is still worthwhile.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the status LED implementation in StatusHandler no longer depends on external libraries. The summary shows FastLED removed from the ESP32 environment, a custom Color st…
Description check Passed The description states that StatusHandler drops the FastLED dependency in favor of a custom color structure and direct LED control. This matches the summary, which shows the Color struct, the removed …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the status LED implementation in StatusHandler no longer depends on external libraries. The summary shows FastLED removed from the ESP32 environment, a custom Color struct, and direct RGB LED writes. The title is short and specific, though 'with no dependencies' is slightly broad because the change removes one dependency (FastLED) rather than all of them.

Full details: Description check

Explanation

The description states that StatusHandler drops the FastLED dependency in favor of a custom color structure and direct LED control. This matches the summary, which shows the Color struct, the removed FastLED include and platformio.ini dependency, and the new rgbLedWriteOrdered output path. The description is brief and does not list the color renames, but it is clearly related to the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit watched the colors glow,
Red and green, then blue in tow.
The channels fade, one step at a time,
GRB lights answer with a shine.
I nibble clover as they gleam!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e31104a-2d70-4380-9c1c-ce39fcedc02e
Commits

Reviewing files that changed from the base of the PR and between 7271fe3 and 98c9f6b.

Files selected for processing: 3

  • include/esp/StatusHandler.h
  • platformio.ini
  • src/esp/StatusHandler.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added the esp label Nov 24, 2026
@JanPetterMG JanPetterMG changed the title Refactor Status LED implementation to remove external dependency Status LED implementation with no dependencies Nov 24, 2026
@JanPetterMG
JanPetterMG marked this pull request as ready for review November 24, 2026 16:01
Copilot AI lite review requested due to automatic review settings November 24, 2026 16:01

This comment was marked as off-topic.

@JanPetterMG
JanPetterMG added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 0d07ed9 Nov 24, 2026
24 checks passed
@JanPetterMG
JanPetterMG deleted the chore/status-led-refactor branch November 24, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants