Conversation
…groups LED_STRIP_LENGTH also counts the custom switch LEDs, which scripts can only set while that switch is set to NONE. On radios such as the TX16S Mk3, GX15 and TX15 the pattern scripts therefore swept 26 LEDs instead of the 20 gimbal ring LEDs, pausing on the hidden positions and lighting any unused custom switch. The pattern scripts now use BLING_LED_STRIP_LENGTH when the firmware provides it, with a USE_FULL_STRIP option at the top of each script to also drive unused custom switch LEDs. They fall back to the full strip on older firmware and on radios with no decorative LEDs (GX12). gimbal.lua takes the ring layout from getRGBLedInfo() when available, and keeps its own table for older firmware. Ring angles are now counted from the ring's first LED, which gives the same result for the existing table entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Companion to EdgeTX/edgetx#7864.
Summary
LED_STRIP_LENGTHcounts the decorative ("bling") LEDs followed by the custom switch LEDs. A script can only set a custom switch LED while that switch is set to NONE. On the TX16S Mk3, GX15 and TX15, the pattern scripts therefore swept 26 LEDs instead of the 20 gimbal ring LEDs: the sweep paused on the hidden positions, and any unused custom switch joined in.Pattern scripts (
police,scl,scr,runner, the solid colours and the others, in bothcolorandbw128x64) now start with:USE_FULL_STRIP = truealso drives unused custom switch LEDs.BLING_LED_STRIP_LENGTH, which is today's behaviour, and on radios with no decorative LEDs (GX12).gimbal.luatakes the ring layout fromgetRGBLedInfo()when the firmware provides it, and keeps its own per-radio table for older firmware. Ring angles are now counted from the ring's first LED. That matches how the firmware describes a ring, and gives the same result for the existing table entries: I compared the LED output from both paths for TX15, TX16S Mk3, GX15 and ST16.Files that were stored with CRLF line endings keep them.
Testing
gimbal.luawas run in a Lua 5.3 harness with mocked radio functions. It produced identical LED output from the firmware groups and from its own table for TX15, TX16S Mk3, GX15 and ST16.police.luaandgimbal.luawere tested with the firmware from feat(lua): describe the RGB LED layout to scripts, fix custom switch LED mapping edgetx#7864.police.luawas run with both the default andUSE_FULL_STRIP = true. That firmware'sgetRGBLedInfo()ring layout was also verified on the same radio.luacsyntax check.🤖 Generated with Claude Code