CLR logic WIP

This commit is contained in:
Jonathan Redpath 2019-02-08 20:05:54 +00:00
parent 9f377f55c6
commit 8dde947a27
2 changed files with 11 additions and 1 deletions

View file

@ -313,6 +313,10 @@ var LowerECAM = {
return; return;
} }
if (b == "clr" and getprop("/ECAM/Lower/man-select") == 0 and getprop("/ECAM/Lower/fault-select") == 0) {
ecam.ECAM_controller.clear();
}
if (getprop("/ECAM/Lower/fault-select") == 0) { if (getprop("/ECAM/Lower/fault-select") == 0) {
if (b != "clr") { if (b != "clr") {
if (!man_sel) { if (!man_sel) {

View file

@ -220,7 +220,13 @@ var ECAM_controller = {
} }
}, },
clear: func() { clear: func() {
print("Clear!"); foreach (var w; warnings.vector) {
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?
break;
}
}
}, },
}; };