mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Undo MSP API changes.
This commit is contained in:
parent
9463e08f10
commit
9acd560c78
2 changed files with 2 additions and 25 deletions
|
@ -3961,12 +3961,6 @@
|
||||||
"osdWarningGpsRescueDisabled": {
|
"osdWarningGpsRescueDisabled": {
|
||||||
"message": "Warns when GPS Rescue is disabled"
|
"message": "Warns when GPS Rescue is disabled"
|
||||||
},
|
},
|
||||||
"osdWarningRSSI": {
|
|
||||||
"message": "Warns when RSSI is below alarm setting"
|
|
||||||
},
|
|
||||||
"osdWarningLinkQuality": {
|
|
||||||
"message": "Warns when Link Quality is below alarm setting"
|
|
||||||
},
|
|
||||||
|
|
||||||
"osdSectionHelpElements": {
|
"osdSectionHelpElements": {
|
||||||
"message": "Enable or disable OSD elements."
|
"message": "Enable or disable OSD elements."
|
||||||
|
|
|
@ -263,8 +263,7 @@ OSD.initData = function () {
|
||||||
preview_logo: true,
|
preview_logo: true,
|
||||||
preview: [],
|
preview: [],
|
||||||
tooltips: [],
|
tooltips: [],
|
||||||
osd_profiles: {},
|
osd_profiles: {}
|
||||||
overlay_mode: null,
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
OSD.initData();
|
OSD.initData();
|
||||||
|
@ -1373,12 +1372,6 @@ OSD.chooseFields = function () {
|
||||||
F.GPS_RESCUE_DISABLED
|
F.GPS_RESCUE_DISABLED
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
|
||||||
OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([
|
|
||||||
F.RSSI,
|
|
||||||
F.LINK_QUALITY
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OSD.updateDisplaySize = function () {
|
OSD.updateDisplaySize = function () {
|
||||||
|
@ -1501,12 +1494,8 @@ OSD.msp = {
|
||||||
result.push16(warningFlags);
|
result.push16(warningFlags);
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
|
||||||
result.push32(warningFlags);
|
result.push32(warningFlags);
|
||||||
// NOTE: betaflight MSP does not expect result.push8(OSD.data.osd_profiles.number);
|
|
||||||
result.push8(OSD.data.osd_profiles.selected + 1);
|
result.push8(OSD.data.osd_profiles.selected + 1);
|
||||||
result.push8(OSD.data.overlay_mode);
|
|
||||||
}
|
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
|
||||||
result.push8(OSD.data.alarms.link_quality.value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1654,17 +1643,11 @@ OSD.msp = {
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
|
||||||
d.osd_profiles.number = view.readU8();
|
d.osd_profiles.number = view.readU8();
|
||||||
d.osd_profiles.selected = view.readU8() - 1;
|
d.osd_profiles.selected = view.readU8() - 1;
|
||||||
d.overlay_mode = view.readU8();
|
|
||||||
} else {
|
} else {
|
||||||
d.osd_profiles.number = 1;
|
d.osd_profiles.number = 1;
|
||||||
d.osd_profiles.selected = 0;
|
d.osd_profiles.selected = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Link Quality Alarm
|
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
|
||||||
d.alarms['link_quality'] = { display_name: 'Link Quality', value: view.readU8() };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now we have the number of profiles, process the OSD elements
|
// Now we have the number of profiles, process the OSD elements
|
||||||
for (let item of items_positions_read) {
|
for (let item of items_positions_read) {
|
||||||
var j = d.display_items.length;
|
var j = d.display_items.length;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue