Skip to content

Use decorative (bling) LED count for animations - #1

Open
davidbitton wants to merge 2 commits into
pigd0g:mainfrom
davidbitton:fix/bling-led-strip-length
Open

Use decorative (bling) LED count for animations#1
davidbitton wants to merge 2 commits into
pigd0g:mainfrom
davidbitton:fix/bling-led-strip-length

Conversation

@davidbitton

@davidbitton davidbitton commented Aug 27, 2026

Copy link
Copy Markdown

EdgeTX maps Lua LED index 0 to the first decorative ("bling") LED, but current firmware still reports LED_STRIP_LENGTH as bling + function-switch LEDs. On TX16S Mk3 / GX15 / TX15 that is 26, so whole-strip modes walk the CFS range and dual-ring modes split at 13 instead of 10. Configured function-switch LEDs are rejected by setRGBLedColor() and should stay under Radio/Model colours / setCFSLedColor().

This change:

  • Prefers BLING_LED_STRIP_LENGTH when firmware provides it
  • Subtracts CFS_LED_STRIP_LENGTH when that constant exists
  • Falls back to 20 when LED_STRIP_LENGTH == 26 (20 gimbal + 6 CFS) so the tool works on today's 2.11/2.12 builds
  • Wraps setRGBLedColor so patterns cannot write past the decorative range
  • Uses FUNC_RGB_LED from firmware when present instead of hardcoding 25
  • Shows strip length in the tool subtitle and skips setup on radios with no RGB LED API
  • Documents that CFS RGB is not owned by this tool

Companion firmware PR: EdgeTX/edgetx#7716 — makes LED_STRIP_LENGTH decorative-only and exports the new constants.

Prefer BLING_LED_STRIP_LENGTH when firmware provides it. On current
builds that still report 26 (20 gimbal + 6 CFS) on TX16S Mk3 / GX15 /
TX15, fall back to 20 so dual-ring math stays 10+10.

Use FUNC_RGB_LED from firmware when present instead of hardcoding 25.
Function-switch RGB colours stay under Radio/Model settings.
Subtract CFS_LED_STRIP_LENGTH when firmware exposes it, and wrap
setRGBLedColor so patterns cannot paint past the decorative range.
The tool now reports strip length in the subtitle and skips setup
when the radio has no RGB LED API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant