A3XX: Fixed Bug: PFD FMA causing Nasal error

This commit is contained in:
Joshua Davidson 2017-06-13 14:20:03 -04:00
parent 26f2ff9b5d
commit ef2d27ed23

View file

@ -1,6 +1,9 @@
# Airbus PFD FMA
# Joshua Davidson (it0uchpods/411)
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/it-autoflight/internal/alt", 10000);
# Speed or Mach?
var speedmach = func {
if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7)) {
@ -154,6 +157,20 @@ setlistener("/it-autoflight/mode/vert", func {
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "MNG CLB") {
if (newvert != "CLB") {
setprop("/modes/pfd/fma/pitch-mode", "CLB");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "MNG DES") {
if (newvert != "DES") {
setprop("/modes/pfd/fma/pitch-mode", "DES");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
}
altvert();
});