Fix virtual OSD elements and OSD backwards compability bug (#3118)

10.9-maintenance
haslinghuis 2022-12-06 12:20:52 +01:00 committed by GitHub
parent 64b710b074
commit 212b0bdb11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -182,7 +182,7 @@ const VirtualFC = {
virtualOSD.data.unit_mode = 1;
virtualOSD.virtualMode = {
itemPositions: Array.from({length: 60}),
itemPositions: Array.from({length: 77}),
statisticsState: [],
warningFlags: 0,
timerData: [],

View File

@ -2790,16 +2790,14 @@ osd.initialize = function(callback) {
}
// 2 way binding... sorta
function updateOsdView() {
async function updateOsdView() {
// ask for the OSD canvas data
let p;
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
p = MSP.promise(MSPCodes.MSP_OSD_CANVAS);
await MSP.promise(MSPCodes.MSP_OSD_CANVAS);
}
// ask for the OSD config data
p.then(() => MSP.promise(MSPCodes.MSP_OSD_CONFIG))
MSP.promise(MSPCodes.MSP_OSD_CONFIG)
.then(info => {
OSD.chooseFields();