diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index e986acaa..eba61129 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -653,7 +653,7 @@ var masterFMGC = maketimer(0.2, func { } } elsif (FMGCInternal.phase == 3) { if (FMGCInternal.crzFl >= 200) { - if ((flightPlanController.arrivalDist <= 200 or altSel < 20000)) { + if ((flightPlanController.arrivalDist <= 200 and altSel < 20000)) { newphase = 4; systems.PNEU.pressMode.setValue("DE"); } @@ -667,10 +667,6 @@ var masterFMGC = maketimer(0.2, func { if (getprop("/FMGC/internal/decel")) { newphase = 5; } - elsif (altSel == (FMGCInternal.crzFl * 100)) { # back to CRZ state - newphase = 3; - systems.PNEU.pressMode.setValue("CR"); - } } elsif (FMGCInternal.phase == 5) { if (state1 == "TOGA" and state2 == "TOGA") { newphase = 6; @@ -683,7 +679,6 @@ var masterFMGC = maketimer(0.2, func { } } - if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint setprop("/FMGC/internal/decel", 1); diff --git a/Nasal/MCDU/PROG.nas b/Nasal/MCDU/PROG.nas index 116c5c44..df91a0cd 100644 --- a/Nasal/MCDU/PROG.nas +++ b/Nasal/MCDU/PROG.nas @@ -48,6 +48,8 @@ var progCLBInput = func(key, i) { fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; if (fmgc.FMGCInternal.phase == 5) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0); @@ -60,6 +62,8 @@ var progCLBInput = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); if (fmgc.FMGCInternal.phase == 5) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0); @@ -80,6 +84,8 @@ var progCRZInput = func(key, i) { fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; if (fmgc.FMGCInternal.phase == 5) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0); @@ -92,6 +98,8 @@ var progCRZInput = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); if (fmgc.FMGCInternal.phase == 5) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0); @@ -112,6 +120,8 @@ var progDESInput = func(key, i) { fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; if (fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0); @@ -124,6 +134,8 @@ var progDESInput = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); if (fmgc.FMGCInternal.phase == 4 or fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { fmgc.FMGCInternal.phase = 3; + fmgc.FMGCNodes.phase.setValue(3); + systems.PNEU.pressMode.setValue("CR"); setprop("/FMGC/internal/activate-once", 0); setprop("/FMGC/internal/activate-twice", 0); setprop("/FMGC/internal/decel", 0);