betaflight / betaflight

Open Source Flight Controller Firmware
GNU General Public License v3.0
8.06k stars 2.87k forks source link

Use fixed LED color table in RACE / BEACON LED profiles #13339

Closed CapnBry closed 3 months ago

CapnBry commented 4 months ago

Changes ledstrip to used fixed colors (instead of user-customized colors) for BEACON and RACE profile, except for RACE+BLACK (Color-by-frequency). This allows for the user editing their custom colors but still getting fixed colors when setting the color by name via CMS / CLI.

Q: Can I still CLI into my FC at an event and upload the race director's custom VTX colors per frequency to have them change automatically? A: Yes. Use either STATUS + VTX Overlay, or RACE + BLACK

Ref: Discord ctzsnooze said +1 good thing.

Issue

Currently custom colors are used for for all LED profiles, with the exception of overlays and blinks. Once these colors are changed, the fixed colors no longer correspond to what they are supposed to be. e.g:

This is true for ledstrip_beacon_color as well, and also ledstrip_visual_beeper_color but only in RACE/BEACON profile, the beeper color is respected in STATUS profile.

Two Modes

Concerns were raised on Discord that some users still want their Led-Color-By-VTX-Frequencies to be automatic but also custom. This PR attempts to please those users, as well as those requesting fixed colors by name.

github-actions[bot] commented 4 months ago

Do you want to test this code? You can flash it directly from Betaflight Configurator:

WARNING: It may be unstable. Use only for testing!

nerdCopter commented 3 months ago

@cruwaller please review and share thoughts.

@CapnBry @sugaarK @ctzsnooze , you all had a few comments in Discord about this, maybe those thoughts should go here for anyone not in Discord.

reference https://github.com/betaflight/betaflight/pull/13096

CapnBry commented 3 months ago

@CapnBry @sugaarK @ctzsnooze , you all had a few comments in Discord about this, maybe those thoughts should go here for anyone not in Discord.

I've edited the OP to reflect these concerns.

In short, it was thought that many users would find it easier at an event to upload custom colors to be used by the VTX-frequency-sets-color, which would not work with the original code I PRed. I believe this has been addressed with a good compromise: VTX-frequency-sets-color now always uses custom colors instead of fixed. The documentation will need to be updated, as it states the frequency sets the color, when actually sets the color index in both master and this PR.