continue clear logic

This commit is contained in:
Jonathan Redpath 2019-02-12 15:16:23 +00:00
parent 9fbdfeb7c8
commit 2f4e5cf5d9
2 changed files with 4 additions and 6 deletions

View file

@ -233,8 +233,6 @@ var ECAM_controller = {
clear: func() { clear: func() {
foreach (var w; warnings.vector) { foreach (var w; warnings.vector) {
if (w.active == 1) { if (w.active == 1) {
w.active = 0; # todo: need to hit CLR to clear condition, not automatic
w.noRepeat = 0; # should warning only clear if condition is not true?
w.clearFlag = 1; w.clearFlag = 1;
break; break;
} }
@ -243,7 +241,6 @@ var ECAM_controller = {
recall: func() { recall: func() {
foreach (var w; warnings.vector) { foreach (var w; warnings.vector) {
if (w.clearFlag == 1) { if (w.clearFlag == 1) {
w.active = 1;
w.noRepeat = 1; w.noRepeat = 1;
w.clearFlag = 0; w.clearFlag = 0;
break; break;

View file

@ -4,15 +4,16 @@
var messages_priority_3 = func { var messages_priority_3 = func {
# FCTL # FCTL
if (getprop("/ECAM/warning-phase") == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) { if ((flap_not_zero.clearFlag == 0) and getprop("/ECAM/warning-phase") == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1; flap_not_zero.active = 1;
} else { } else {
flap_not_zero.active = 0; flap_not_zero.active = 0;
flap_not_zero.noRepeat = 0; flap_not_zero.noRepeat = 0;
flap_not_zero.clearFlag = 0;
} }
# CONFIG # CONFIG
if ((getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever")) == 4 and getprop("/ECAM/warning-phase") >= 3 and getprop("/ECAM/warning-phase") <= 4) { if ((slats_config.clearFlag == 0) and (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever")) == 4 and getprop("/ECAM/warning-phase") >= 3 and getprop("/ECAM/warning-phase") <= 4) {
slats_config.active = 1; slats_config.active = 1;
slats_config_1.active = 1; slats_config_1.active = 1;
} else { } else {
@ -22,7 +23,7 @@ var messages_priority_3 = func {
slats_config_1.noRepeat = 0; slats_config_1.noRepeat = 0;
} }
if ((getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever") == 4) and getprop("/ECAM/warning-phase") >= 3 and getprop("/ECAM/warning-phase") <= 4) { if ((flaps_config.clearFlag == 0) and (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever") == 4) and getprop("/ECAM/warning-phase") >= 3 and getprop("/ECAM/warning-phase") <= 4) {
flaps_config.active = 1; flaps_config.active = 1;
flaps_config_1.active = 1; flaps_config_1.active = 1;
} else { } else {