diff --git a/Nasal/buttons.nas b/Nasal/buttons.nas index 8f2edb87..0f7cc6f6 100644 --- a/Nasal/buttons.nas +++ b/Nasal/buttons.nas @@ -235,25 +235,29 @@ var APPanel = { } }, APDisc: func() { - if (ap1.getBoolValue() or ap2.getBoolValue()) { - libraries.apOff("soft", 0); - } else { - if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) { - setprop("/it-autoflight/sound/apoffsound", 0); - setprop("/it-autoflight/sound/apoffsound2", 0); + if (dcEss.getValue() >= 25) { + if (ap1.getBoolValue() or ap2.getBoolValue()) { + libraries.apOff("soft", 0); + } else { + if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) { + setprop("/it-autoflight/sound/apoffsound", 0); + setprop("/it-autoflight/sound/apoffsound2", 0); + } + setprop("/it-autoflight/output/ap-warning", 0); + setprop("/ECAM/warnings/master-warning-light", 0); } - setprop("/it-autoflight/output/ap-warning", 0); - setprop("/ECAM/warnings/master-warning-light", 0); } }, ATDisc: func() { - if (athr.getBoolValue()) { - libraries.athrOff("soft"); - setprop("/ECAM/warnings/master-caution-light", 1); - } else { - if (getprop("/it-autoflight/output/athr-warning") == 1) { - setprop("/it-autoflight/output/athr-warning", 0); - setprop("/ECAM/warnings/master-caution-light", 0); + if (dcEss.getValue() >= 25) { + if (athr.getBoolValue()) { + libraries.athrOff("soft"); + setprop("/ECAM/warnings/master-caution-light", 1); + } else { + if (getprop("/it-autoflight/output/athr-warning") == 1) { + setprop("/it-autoflight/output/athr-warning", 0); + setprop("/ECAM/warnings/master-caution-light", 0); + } } } }, @@ -343,18 +347,22 @@ var APPanel = { } }, HDGPush: func() { - if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { - setprop("/it-autoflight/input/lat", 1); + if (dcEss.getValue() >= 25) { + if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { + setprop("/it-autoflight/input/lat", 1); + } } }, HDGPull: func() { - if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { - if (latMode.getValue() == 0 or !showHDG.getBoolValue()) { - setprop("/it-autoflight/input/lat", 3); - showHDG.setBoolValue(1); - } else { - setprop("/it-autoflight/input/lat", 0); - showHDG.setBoolValue(1); + if (dcEss.getValue() >= 25) { + if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { + if (latMode.getValue() == 0 or !showHDG.getBoolValue()) { + setprop("/it-autoflight/input/lat", 3); + showHDG.setBoolValue(1); + } else { + setprop("/it-autoflight/input/lat", 0); + showHDG.setBoolValue(1); + } } } },