Merge pull request #1579 from iNavFlight/MrD_Hide-switch-indicators-settings-when-DJI-is-used_5.1

Hide switch indicators settings when DJI is used
pull/1580/head
Paweł Spychalski 2 years ago committed by GitHub
commit 451dce3e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -243,7 +243,7 @@
</label> </label>
</div> </div>
</div> </div>
<div class="gui_box grey switch-indicator-container"> <div class="gui_box grey switch-indicator-container">
<div class="gui_box_titlebar"> <div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="osd_switch_indicator_settings"></div> <div class="spacer_box_title" data-i18n="osd_switch_indicator_settings"></div>
</div> </div>

@ -493,6 +493,7 @@ OSD.DjiElements = {
"Timers", "Timers",
"VTX", "VTX",
"CRSF", "CRSF",
"SwitchIndicators",
"GVars", "GVars",
"PIDs", "PIDs",
"PIDOutputs", "PIDOutputs",
@ -2571,6 +2572,8 @@ OSD.GUI.updateDjiView = function(on) {
$(element).hide(); $(element).hide();
} }
}); });
$('.switch-indicator-container').hide();
} else { } else {
$(OSD.DjiElements.emptyGroups).each(function(index, groupName) { $(OSD.DjiElements.emptyGroups).each(function(index, groupName) {
$('#osdGroup' + groupName).show(); $('#osdGroup' + groupName).show();
@ -2583,6 +2586,8 @@ OSD.GUI.updateDjiView = function(on) {
$('.settings-container, .alarms-container').find('.settings').children() $('.settings-container, .alarms-container').find('.settings').children()
.show() .show()
.removeClass('no-bottom'); .removeClass('no-bottom');
$('.switch-indicator-container').show();
} }
OSD.GUI.updateDjiMessageElements($('#useCraftnameForMessages').is(':checked')); OSD.GUI.updateDjiMessageElements($('#useCraftnameForMessages').is(':checked'));
}; };

Loading…
Cancel
Save