Fix virtual OSD elements and OSD backwards compability bug (#3118)
parent
64b710b074
commit
212b0bdb11
|
@ -182,7 +182,7 @@ const VirtualFC = {
|
||||||
virtualOSD.data.unit_mode = 1;
|
virtualOSD.data.unit_mode = 1;
|
||||||
|
|
||||||
virtualOSD.virtualMode = {
|
virtualOSD.virtualMode = {
|
||||||
itemPositions: Array.from({length: 60}),
|
itemPositions: Array.from({length: 77}),
|
||||||
statisticsState: [],
|
statisticsState: [],
|
||||||
warningFlags: 0,
|
warningFlags: 0,
|
||||||
timerData: [],
|
timerData: [],
|
||||||
|
|
|
@ -2790,16 +2790,14 @@ osd.initialize = function(callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2 way binding... sorta
|
// 2 way binding... sorta
|
||||||
function updateOsdView() {
|
async function updateOsdView() {
|
||||||
|
|
||||||
// ask for the OSD canvas data
|
// ask for the OSD canvas data
|
||||||
let p;
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
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
|
MSP.promise(MSPCodes.MSP_OSD_CONFIG)
|
||||||
p.then(() => MSP.promise(MSPCodes.MSP_OSD_CONFIG))
|
|
||||||
.then(info => {
|
.then(info => {
|
||||||
|
|
||||||
OSD.chooseFields();
|
OSD.chooseFields();
|
||||||
|
|
Loading…
Reference in New Issue