betaflight / firmware-presets

Configuration Snippets for the Betaflight Flight Controller Firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For some of the option allow just a single one being selected

NemesisXB opened this issue · comments

Don't know if this is the right place to create the issue or if it should be done for configurator. Let me know if I should close it here and open it there.

I have a couple of presets that have multiple options, but the user should not be able to select both options. I was thinking that some of the options can be group to only allow a single option to be selected in the group. Like grouped radio buttons work basically. Multiple groups should be possible, maybe even giving the group a name.

As example below. Maybe the items can be grouped without the EXCLUSIVE tag, just making it more readable. It should also be backwards compatible as the OPTIONGROUP should be optional.

The only way of solving this with the current implementation is to inform the user in the disclaimer or description to only select one item.

#$ TITLE: SpeedyBee TX800 VTX Tables
#$ FIRMWARE_VERSION: 4.2
#$ FIRMWARE_VERSION: 4.3
#$ CATEGORY: VTX
#$ STATUS: COMMUNITY
#$ KEYWORDS:  vtx, vtx table, speedybee, tx800
#$ AUTHOR: NemesisXB
#$ DESCRIPTION: VTX tables for the SpeedyBee TX800.
#$ DESCRIPTION: Select the regulatory domain in the options (EU or US).
#$ DISCLAIMER:  Only select one regulatory option. All previous VTX Table settings will be reset.
#$ INCLUDE_DISCLAIMER: misc/disclaimer/en/vtxtable.txt
#$ DISCUSSION:  https://github.com/betaflight/firmware-presets/pull/105 

#$ INCLUDE: presets/4.3/vtx/defaults_vtx_tables.txt

# Configure common vtxtable settings
vtxtable bands 5
vtxtable channels 8
vtxtable powerlevels 5
vtxtable powervalues 25 200 400 600 600
vtxtable powerlabels 25 200 400 800 800

#$ OPTIONGROUP BEGIN (EXCLUSIVE): Regulatory Domain
#$ OPTION BEGIN (UNCHECKED): EU
vtxtable bands 4
vtxtable band 1 BOSCAM_A A CUSTOM  5865 5845 5825 5805 5785 5765 5745    0
vtxtable band 2 BOSCAM_B B CUSTOM  5733 5752 5771 5790 5809 5828 5847 5866
vtxtable band 3 FATSHARK F CUSTOM  5740 5760 5780 5800 5820 5840 5860    0
vtxtable band 4 RACEBAND R CUSTOM     0    0    0 5769 5806 5843    0    0
#$ OPTION END

#$ OPTION BEGIN (CHECKED): US
vtxtable band 1 BOSCAM_A A CUSTOM  5865 5845 5825 5805 5785 5765 5745 5725
vtxtable band 2 BOSCAM_B B CUSTOM  5733 5752 5771 5790 5809 5828 5847 5866
vtxtable band 3 BOSCAM_E E CUSTOM  5705 5685 5665    0 5885 5905    0    0
vtxtable band 4 FATSHARK F CUSTOM  5740 5760 5780 5800 5820 5840 5860 5880
vtxtable band 5 RACEBAND R CUSTOM  5658 5695 5732 5769 5806 5843 5880 5917
#$ OPTION END
#$ OPTIONGROUP END

the checked options are applied in order.. yes you can over write one with another. there is no way to give situation to options so the user will have to use there own brians processing power and make good decision

the checked options are applied in order.. yes you can over write one with another. there is no way to give situation to options so the user will have to use there own brians processing power and make good decision

Yes, I understand that there is currently no way of handling it. That is why I made the feature request. Going through the presets, there are a lot of presets that will benefit from a feature like described above. It is obviously not a bug and just a feature request, making it low priority but a nice to have.

Unfortunately right now getting the whole project to RC phase is the mission so it would be a 4.4 feature

Yeah this is a good suggestion. We probably can make it after the release.

100% agree, we all feel that this would be really useful

I believe this was merged? Can I close this issue?

EDIT:
On second thought. I tested it now, the groups works great. What is still outstanding is the EXCLUSIVE tag. For example on the below image, I am still able to pick both RC LINK options. I was hoping that having the exclusive tag, I can make groups that does not allow the user to pick multiple items in that group, so it works more like grouped radio buttons. And if you don't have the exclusive tag, it just groups the items (like it is doing now) for easier reading.

@limonspb , is this something that might be worked on? Should I close this issue and make a new one? Or is it fine just keeping this one open?

image

We hope to offer an exclusive choice method in the future. for now the last selected option, in order, will dominate any that precede it