diff --git a/Nasal/FMGC-b.nas b/Nasal/FMGC-b.nas index 00d4113b..d3df4a40 100644 --- a/Nasal/FMGC-b.nas +++ b/Nasal/FMGC-b.nas @@ -614,6 +614,10 @@ var vertical = func { } } +var disarmLOC = func { + setprop("/it-autoflight/output/loc-armed", 0); +} + var disarmGS = func { alandt.stop(); alandt1.stop(); diff --git a/Nasal/buttons.nas b/Nasal/buttons.nas index 6de5a6bc..68714991 100644 --- a/Nasal/buttons.nas +++ b/Nasal/buttons.nas @@ -388,10 +388,21 @@ var APPanel = { if (dcEss.getValue() >= 25) { var vertTemp = vertMode.getValue(); if ((locArm.getBoolValue() or latMode.getValue() == 2) and !apprArm.getBoolValue() and vertTemp != 2 and vertTemp != 6) { - setprop("/it-autoflight/input/lat", 0); + if (latMode.getValue() == 2) { + setprop("/it-autoflight/input/lat", 0); + } else { + fmgc.disarmLOC(); + } + if (vertTemp == 2 or vertTemp == 6) { + me.VSPull(); + } else { + fmgc.disarmGS(); + } } else { setprop("/it-autoflight/input/lat", 2); - if (apprArm.getBoolValue() or vertTemp == 2) { + if (vertTemp == 2 or vertTemp == 6) { + me.VSPull(); + } else { fmgc.disarmGS(); } } @@ -513,8 +524,16 @@ var APPanel = { if (dcEss.getValue() >= 25) { var vertTemp = vertMode.getValue(); if ((locArm.getBoolValue() or latMode.getValue() == 2) and (apprArm.getBoolValue() or vertTemp == 2 or vertTemp == 6)) { - setprop("/it-autoflight/input/lat", 0); - me.VSPull(); + if (latMode.getValue() == 2) { + setprop("/it-autoflight/input/lat", 0); + } else { + fmgc.disarmLOC(); + } + if (vertTemp == 2 or vertTemp == 6) { + me.VSPull(); + } else { + fmgc.disarmGS(); + } } else { setprop("/it-autoflight/input/vert", 2); } diff --git a/revision.txt b/revision.txt index b8fe0bad..86bcbf3d 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4770 \ No newline at end of file +4771 \ No newline at end of file