1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Add support for max7456 detected flag

Hides the font manager if the max7456 is not detected to prevent the firmware wedging.

Also fixes the OSD Profile div hiding to not be based on the target having a max7456.
This commit is contained in:
Bruce Luckcuck 2019-11-10 19:19:11 -05:00
parent 13bde2c415
commit 5c795957d8
2 changed files with 8 additions and 2 deletions

View file

@ -1798,6 +1798,7 @@ OSD.msp = {
d.state = {}; d.state = {};
d.state.haveSomeOsd = (d.flags != 0) d.state.haveSomeOsd = (d.flags != 0)
d.state.haveMax7456Video = bit_check(d.flags, 4) || (d.flags == 1 && semver.lt(CONFIG.apiVersion, "1.34.0")); d.state.haveMax7456Video = bit_check(d.flags, 4) || (d.flags == 1 && semver.lt(CONFIG.apiVersion, "1.34.0"));
d.state.isMax7456Detected = bit_check(d.flags, 5) || (d.state.haveMax7456Video && semver.lt(CONFIG.apiVersion, "1.43.0"));
d.state.haveOsdFeature = bit_check(d.flags, 0) || (d.flags == 1 && semver.lt(CONFIG.apiVersion, "1.34.0")); d.state.haveOsdFeature = bit_check(d.flags, 0) || (d.flags == 1 && semver.lt(CONFIG.apiVersion, "1.34.0"));
d.state.isOsdSlave = bit_check(d.flags, 1) && semver.gte(CONFIG.apiVersion, "1.34.0"); d.state.isOsdSlave = bit_check(d.flags, 1) && semver.gte(CONFIG.apiVersion, "1.34.0");
@ -2364,6 +2365,11 @@ TABS.osd.initialize = function (callback) {
if (!OSD.data.state.haveMax7456Video) { if (!OSD.data.state.haveMax7456Video) {
$('.requires-max7456').hide(); $('.requires-max7456').hide();
$('.requires-detected-max7456').hide();
}
if (!OSD.data.state.haveMax7456Video || !OSD.data.state.isMax7456Detected) {
$('.requires-detected-max7456').hide();
} }
if (!OSD.data.state.haveOsdFeature) { if (!OSD.data.state.haveOsdFeature) {

View file

@ -64,7 +64,7 @@
</div> </div>
<div class="cf_column third_right" style="width: calc(100% - 377px);"> <div class="cf_column third_right" style="width: calc(100% - 377px);">
<div class="gui_box osdprofile-selected-container grey requires-max7456"> <div class="gui_box osdprofile-selected-container grey">
<div class="gui_box_titlebar cf_tip"> <div class="gui_box_titlebar cf_tip">
<div class="spacer_box_title" i18n="osdSetupSelectedProfileTitle"></div> <div class="spacer_box_title" i18n="osdSetupSelectedProfileTitle"></div>
</div> </div>
@ -198,7 +198,7 @@
<div class="btn save"> <div class="btn save">
<a class="active save" href="#" i18n="osdSetupSave"></a> <a class="active save" href="#" i18n="osdSetupSave"></a>
</div> </div>
<div class="btn requires-max7456"> <div class="btn requires-detected-max7456">
<a class="fonts" id="fontmanager" href="#" i18n="osdSetupFontManager"></a> <a class="fonts" id="fontmanager" href="#" i18n="osdSetupFontManager"></a>
</div> </div>
</div> </div>