1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 08:15:22 +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.haveSomeOsd = (d.flags != 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.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) {
$('.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) {