mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 06:45:12 +03:00
Added warning if factory bands selected in unsupported configuration.
This commit is contained in:
parent
2902db5c39
commit
241f1addae
3 changed files with 12 additions and 0 deletions
|
@ -5093,6 +5093,10 @@
|
|||
"message": "<span class=\"message-negative\">Attention:</span> You need to configure and save FIRST the VTX Table at the bottom before you can make use of the $t(vtxSelectedMode.message) fields.",
|
||||
"description": "Message to show when the VTX is not supported in the VTX tab"
|
||||
},
|
||||
"vtxMessageFactoryBandsNotSupported": {
|
||||
"message": "<span class=\"message-negative\">Attention:</span> The selected VTX type does not support the 'factory' setting for bands, but some of your bands have this setting. Click '$t(vtxButtonSave.message)' to fix this.",
|
||||
"description": "Message to show when the configured VTX type does not support factory bands, but one or more of the configured bands are of this type"
|
||||
},
|
||||
"vtxMessageVerifyTable": {
|
||||
"message": "<span class=\"message-negative\">Attention:</span> The values of the VTX Table have been loaded, but not yet stored on the flight controller. You must verify and modify the values to be sure that they are valid and legal in your country and then press the $t(vtxButtonSave.message) button to store them on the flight controller.",
|
||||
"description": "Message to show when the VTX Table has been loaded from a external source"
|
||||
|
|
|
@ -278,15 +278,19 @@ TABS.vtx.initialize = function (callback) {
|
|||
$("#vtx_table_channels").val(VTX_CONFIG.vtx_table_channels);
|
||||
|
||||
// Populate VTX Table
|
||||
let hasFactoryBands = false;
|
||||
for (let i = 1; i <= TABS.vtx.VTXTABLE_BAND_LIST.length; i++) {
|
||||
$(`#vtx_table_band_name_${i}`).val(TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_name);
|
||||
$(`#vtx_table_band_letter_${i}`).val(TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_letter);
|
||||
$(`#vtx_table_band_factory_${i}`).prop("checked", TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_is_factory_band);
|
||||
hasFactoryBands = hasFactoryBands || TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_is_factory_band;
|
||||
for (let j = 1; j <= TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_frequencies.length; j++) {
|
||||
$(`#vtx_table_band_channel_${i}_${j}`).val(TABS.vtx.VTXTABLE_BAND_LIST[i - 1].vtxtable_band_frequencies[j - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
$(".vtx_table_factory_bands_not_supported").toggle(!TABS.vtx.vtxTableFactoryBandsSupported && hasFactoryBands);
|
||||
|
||||
// Actions and other
|
||||
function frequencyOrBandChannel() {
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
<div i18n="vtxMessageTableNotConfigured"/>
|
||||
</div>
|
||||
|
||||
<div class="note vtx_table_factory_bands_not_supported">
|
||||
<div i18n="vtxMessageFactoryBandsNotSupported"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="columnsWrapper">
|
||||
<div class="gui_box grey select_mode vtx_supported leftColumn">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue