Skip to content

Commit

Permalink
Fix virtual OSD elements and OSD backwards compability bug (#3118)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored Dec 6, 2022
1 parent 64b710b commit 212b0bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/js/VirtualFC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
8 changes: 3 additions & 5 deletions src/js/tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 212b0bd

Please sign in to comment.