Skip to content

Commit 1883dcc

Browse files
freasyEike Ahmelshaslinghuis
authored
Adds support for Airbot Theia OSD (#4476)
* add support and handling for new msp osd chip from airbot (theia osd) * Only available for API 1.47 --------- Co-authored-by: Eike Ahmels <[email protected]> Co-authored-by: Mark Haslinghuis <[email protected]>
1 parent 4995078 commit 1883dcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/js/tabs/osd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,6 +2794,7 @@ OSD.msp = {
27942794
d.state.haveMax7456Configured = bit_check(d.flags, 4);
27952795
d.state.haveFrSkyOSDConfigured = bit_check(d.flags, 3);
27962796
d.state.haveMax7456FontDeviceConfigured = d.state.haveMax7456Configured || d.state.haveFrSkyOSDConfigured;
2797+
d.state.haveAirbotTheiaOsdDevice = bit_check(d.flags, 7) && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47);
27972798
d.state.isMax7456FontDeviceDetected = bit_check(d.flags, 5);
27982799
d.state.haveOsdFeature = bit_check(d.flags, 0);
27992800
d.state.isOsdSlave = bit_check(d.flags, 1);
@@ -3543,7 +3544,7 @@ osd.initialize = function (callback) {
35433544
OSD.msp.decode(info);
35443545
}
35453546

3546-
if (OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.isMax7456FontDeviceDetected) {
3547+
if (OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.isMax7456FontDeviceDetected && !OSD.data.state.haveAirbotTheiaOsdDevice) {
35473548
$(".noOsdChipDetect").show();
35483549
}
35493550

@@ -3819,7 +3820,7 @@ osd.initialize = function (callback) {
38193820
$(".requires-max7456").hide();
38203821
}
38213822

3822-
if (!OSD.data.state.isMax7456FontDeviceDetected || !OSD.data.state.haveMax7456FontDeviceConfigured) {
3823+
if (!OSD.data.state.isMax7456FontDeviceDetected || (!OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.haveAirbotTheiaOsdDevice)) {
38233824
$(".requires-max7456-font-device-detected").addClass("disabled");
38243825
}
38253826

0 commit comments

Comments
 (0)