1
0
Fork 0

MCDU Flightlog and Sensors pages (Bugfix)

set FOB output in kgs or lbs according to config option
This commit is contained in:
Andrea Vezzali 2022-01-16 22:15:58 +01:00
parent 392714a64b
commit 8578119459
2 changed files with 9 additions and 5 deletions

View file

@ -775,9 +775,13 @@ var canvas_MCDU_base = {
var p = logs[i].state;
if (p == 4) p = 3; # RETURN-IN
me[rowsC[p]].setText(logs[i].time);
if (acconfig_weight_kgs.getValue() == 1) {
me[rowsR[p]].setText(sprintf("%3.1f ",logs[i].fob * LBS2KGS));
} else {
me[rowsR[p]].setText(sprintf("%3.1f ",logs[i].fob));
}
}
}
var logpage = mcdu.FlightLogDatabase.getPage(logid);
@ -852,7 +856,7 @@ var canvas_MCDU_base = {
me["Simple_R3S"].setText(sprintf("%-10s",(doorL4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED"));
me["Simple_R3"].setText(sprintf("%-10s",(doorR4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED"));
me["Simple_R4S"].setText(sprintf("%-10s",sprintf("%03.3f",pts.Velocities.groundspeed.getValue())));
if (getprop("/options/system/weight-kgs") == 1) {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R4"].setText(sprintf("%-10s",sprintf("%03.1f",fmgc.FMGCInternal.fob * LBS2KGS)));
} else {
me["Simple_R4"].setText(sprintf("%-10s",sprintf("%03.1f",fmgc.FMGCInternal.fob)));

View file

@ -5,8 +5,8 @@ var OOOIReport = {
new: func(state,time=0,fob="") {
var report = {parents:[OOOIReport]};
report.state = state;
if (getprop("/options/system/weight-kgs") == 1) {
report.fob = (fob != "") ? fob : fmgc.FMGCInternal.fob * LBS2KGS
if (acconfig_weight_kgs.getValue() == 1) {
report.fob = (fob != "") ? fob : fmgc.FMGCInternal.fob * LBS2KGS;
} else {
report.fob = (fob != "") ? fob : fmgc.FMGCInternal.fob;
}