From 77120dcf04b9145f54bc6e50d79cbb4f799a3816 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 2 Nov 2019 15:27:01 +0000 Subject: [PATCH] Cancel warnings when the condition no longer exists --- Nasal/ECAM/ECAM-controller.nas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index fec4767d..6dca8883 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -52,6 +52,7 @@ var warning = { }, write: func() { if (me.active == 0) { return; } + me.wasActive = 1; lineIndex = 0; while (lineIndex < 7 and lines[lineIndex].getValue() != "") { lineIndex = lineIndex + 1; # go to next line until empty line @@ -74,6 +75,7 @@ var warning = { lights[me.light].setBoolValue(1); me.noRepeat = 1; } elsif (me.wasActive) { + print("Yesssssss"); lights[me.light].setBoolValue(0); me.wasActive = 0; } @@ -89,6 +91,7 @@ var warning = { aural[me.aural].setBoolValue(1); }, 0.15); } elsif (me.wasActive) { + print("Noooooooo"); aural[me.aural].setBoolValue(0); me.wasActive = 0; }