LED Strip: add rainbow overlay - #11820
Conversation
Release/9.1 to master
…-flash-diff-comment-9.1 Fix arm-none-eabi-size not found on real CI runners
PR Summary by QodoAdd configurable rainbow LED strip overlay
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
Moved timRainbow to execute first in the layer table so subsequent layers (Blink, Larson) can modify brightness. Restored hardcoded S=0 and V=255 overrides to ensure the rainbow overlay functions independently of the baseline GUI color selection. This has been tested on hardware and seems to function as intended. Hardware: SKYSTARSH743HD with 14 LEDs in a Ring
|
RAM / Flash usage vs. base branch — commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #11820 246 targets built. Find your board's
|
|
Thanks for the PR — the rainbow overlay is a nice addition, and it fits the existing timed-layer architecture really cleanly. I took a look at this with an AI-based review tool I have; it may well be wrong on any of the points below — please treat them as questions to check rather than a verdict, and correct me if I have misread anything. 1. Did you intend to change the WHITE palette entry? It looks like it renders RED nowIn the last commit ( - [COLOR_WHITE] = { 0, 255, 255},
+ [COLOR_WHITE] = { 0, 0, 255},INAV uses an inverted-saturation HSV convention — 2. The 8-overlay configuration now overflows a 20-byte stack buffer in the CLI
3. Minor questions/notes (no urgency)
Positive notes (for the record)The fixed-point accumulator checks out (no overflow, exact average rate, clean 358°→0° wrap), the overlay placement first in Really appreciate the work — the architecture integration is the clean part. Looking forward to your take on #1 and #2! |
Adds a new RGB sweep/rainbow overlay ('V') to the LED strip system.
When enabled on any LED, the overlay continuously sweeps through the color spectrum using a fixed-point accumulator for efficient hue advancement. The sweep rate and per-LED hue offset are configurable via two new settings:
ledstrip_rainbow_sweep_rate(0-255, default 10) — controls sweep speed. Higher values sweep faster. 0 freezes the rainbow.ledstrip_rainbow_delta_deg(0-359, default 30) — hue offset in degrees between adjacent rainbow LEDs. Larger values spread more of the spectrum across the strip.Companion configurator PR: iNavFlight/inav-configurator#2718
Testing: Verified on SKYSTARSH743HD with 14 LEDs configured with the rainbow overlay active.