PFD: make the altitude field display flight levels with correct spacing
This commit is contained in:
parent
e498edb4a3
commit
b0dc826480
2 changed files with 8 additions and 10 deletions
|
@ -687,23 +687,18 @@ var canvas_pfd = {
|
|||
}),
|
||||
props.UpdateManager.FromHashList(["altimeterHpa","altimeterInhg","altimeterInhgMode"], 0.005, func(val) {
|
||||
if (val.altimeterInhgMode == 0) {
|
||||
obj["QNH_setting"].setText(sprintf("%4.0f", val.altimeterHpa));
|
||||
obj["QNH_setting"].setText(sprintf("%4d", val.altimeterHpa));
|
||||
} else {
|
||||
obj["QNH_setting"].setText(sprintf("%2.2f", val.altimeterInhg));
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altimeterStd","altitudeAutopilot"], 1, func(val) {
|
||||
if (val.altimeterStd == 1) {
|
||||
if (val.altitudeAutopilot < 10000) {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
} else {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
}
|
||||
obj["ALT_digit_UP"].setText(sprintf("FL%3d", val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("FL%3d", val.altitudeAutopilot / 100));
|
||||
} else {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%5.0f", val.altitudeAutopilot));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%5.0f", val.altitudeAutopilot));
|
||||
obj["ALT_digit_UP"].setText(sprintf("%5d", val.altitudeAutopilot));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%5d", val.altitudeAutopilot));
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("managedSpd", 1, func(val) {
|
||||
|
|
|
@ -192,6 +192,9 @@ var ELEC = {
|
|||
me.Fail.tr1Fault.setBoolValue(0);
|
||||
me.Fail.tr2Fault.setBoolValue(0);
|
||||
},
|
||||
loop: func() {
|
||||
# Empty, required for Emesary
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("/systems/fmgc/power/power-1-on", func(val) {
|
||||
|
|
Loading…
Reference in a new issue