From 8eca53fc572085f69cbbb20ff410f50a4b737c31 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 28 Jan 2019 13:52:58 +0000 Subject: [PATCH] Bugfix: reconnection disables warning --- Nasal/ECAM.nas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nasal/ECAM.nas b/Nasal/ECAM.nas index 1a835983..98d3590e 100644 --- a/Nasal/ECAM.nas +++ b/Nasal/ECAM.nas @@ -197,7 +197,6 @@ var ECAM = { } # AP / ATHR warnings - # No evidence found that re-engagement disconnects warnings - if anyone has any evidence to the contrary let me know if (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 0) { ap_active = 0; } elsif (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/ap-off-time") + 9)) { @@ -211,6 +210,10 @@ var ECAM = { setprop("/ECAM/warnings/master-warning-light", 0); } + if (getprop("/it-autoflight/output/ap-warning") == 2 and (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1)) { + setprop("/it-autoflight/output/ap-warning", 0); + } + if (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 0) { athr_active = 0; } elsif (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/athr-off-time") + 9)) { @@ -225,6 +228,10 @@ var ECAM = { setprop("/ECAM/warnings/master-caution-light", 0); } + if (getprop("/it-autoflight/output/athr-warning") == 2 and getprop("/it-autoflight/output/athr") == 1) { + setprop("/it-autoflight/output/athr-warning", 0); + } + # Warning Phases if (getprop("/systems/electrical/bus/ac1") < 110 and getprop("/systems/electrical/bus/ac2") < 110 and getprop("/systems/electrical/bus/ac-ess") < 110) { # Reset warning phases