Use decorative (bling) LED count for animations - #1
Open
davidbitton wants to merge 2 commits into
Open
Conversation
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.
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.
EdgeTX maps Lua LED index 0 to the first decorative ("bling") LED, but current firmware still reports
LED_STRIP_LENGTHas 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 bysetRGBLedColor()and should stay under Radio/Model colours /setCFSLedColor().This change:
BLING_LED_STRIP_LENGTHwhen firmware provides itCFS_LED_STRIP_LENGTHwhen that constant existsLED_STRIP_LENGTH == 26(20 gimbal + 6 CFS) so the tool works on today's 2.11/2.12 buildssetRGBLedColorso patterns cannot write past the decorative rangeFUNC_RGB_LEDfrom firmware when present instead of hardcoding 25Companion firmware PR: EdgeTX/edgetx#7716 — makes
LED_STRIP_LENGTHdecorative-only and exports the new constants.