FGMC use other properties

This commit is contained in:
Jonathan Redpath 2017-05-13 14:58:01 +01:00
parent 9193f833a8
commit 2c21d39e67

View file

@ -53,7 +53,7 @@ var phasecheck = maketimer(0.2, func {
var targetalt = getprop("/it-autoflight/input/alt"); var targetalt = getprop("/it-autoflight/input/alt");
var targetvs = getprop("/it-autoflight/input/vs"); var targetvs = getprop("/it-autoflight/input/vs");
var targetfpa = getprop("/it-autoflight/input/fpa"); var targetfpa = getprop("/it-autoflight/input/fpa");
var vertmode = getprop("/it-autoflight/mode/vert"); var vertmode = getprop("/modes/pfd/fma/pitch-mode");
if ((((n1_left >= 85) and (n1_right >= 85)) or (gs > 90 )) and flaps < 4 and (mode == "SRS")) { if ((((n1_left >= 85) and (n1_right >= 85)) or (gs > 90 )) and flaps < 4 and (mode == "SRS")) {
setprop("/FMGC/status/phase", "1"); setprop("/FMGC/status/phase", "1");
} }
@ -73,7 +73,7 @@ var phasecheck = maketimer(0.2, func {
setprop("/FMGC/status/phase", "6"); setprop("/FMGC/status/phase", "6");
} }
# forget transition from APP to climb for now because it would be too complex # forget transition from APP to climb for now because it would be too complex
if ((phase == "6") and ((vertmode == "ALT CAP") or (vertmode == "G/A CLB") or (vertmode == "SPD CLB") or ((vertmode == "V/S") and (targetvs > 0)) or ((vertmode == "FPA") and (targetfpa > 0))) and (alt <= targetalt)) { if ((phase == "6") and ((vertmode == "G/A CLB") or (vertmode == "SPD CLB") or (vertmode == "CLB") or ((vertmode == "V/S") and (targetvs > 0)) or ((vertmode == "FPA") and (targetfpa > 0))) and (alt <= targetalt)) {
setprop("/FMGC/status/phase", "2"); # going to CLIMB mode from GA setprop("/FMGC/status/phase", "2"); # going to CLIMB mode from GA
} }
if ((wowl and wowr) and (gs < 20)) { # below twenty knots. In future make a timer to ensure that it goes to DONE 30 sec after landing. if ((wowl and wowr) and (gs < 20)) { # below twenty knots. In future make a timer to ensure that it goes to DONE 30 sec after landing.