30 sec timer works

This commit is contained in:
legoboyvdlp R 2019-04-26 08:55:55 +01:00
parent 882740c02a
commit 0bd902fbe7
2 changed files with 18 additions and 10 deletions

View file

@ -296,11 +296,15 @@ var messages_priority_3 = func {
eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:";
}
if (eng1FireFlAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) {
if (eng1FireFlAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) {
eng1FireFl30Sec.active = 1;
eng1FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFl30Sec);
}
if (eng1FireFlAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) {
eng1FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent2);
}
} else {
@ -368,7 +372,7 @@ var messages_priority_3 = func {
eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH";
}
if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
eng2FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1Timer);
@ -387,14 +391,18 @@ var messages_priority_3 = func {
}
if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) {
eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:";
eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:";
}
if (eng2FireFlAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) {
eng2FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFl30Sec);
}
if (eng2FireFlAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) {
eng2FireFl30Sec.active = 1;
eng2FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFl30Sec);
ECAM_controller.warningReset(eng2FireFlAgent2);
}
} else {

View file

@ -386,12 +386,12 @@ var extinguisherBottle = {
me.lightProp.setValue(1);
# make things interesting. If your fire won't go out you should play the lottery
if (me.number == 0) {
if (rand() < 0.75) {
if (rand() < 0.90) {
me.failProp.setValue(0);
me.warningProp.setValue(0);
}
} elsif (me.number == 1) {
if (rand() < 0.98) {
if (rand() < 0.999) {
me.failProp.setValue(0);
me.warningProp.setValue(0);
}
@ -550,7 +550,7 @@ eng1AgentTimerMakeTimerFunc = func() {
eng1Agent2TimerMakeTimerFunc = func() {
if (eng1Agent2Timer.getValue() > 0) {
var eng1Time2 = eng1AgentTimerTime.getValue();
var eng1Time2 = eng1Agent2TimerTime.getValue();
var etEng12 = elapsedTime.getValue();
var timeToSetEng12 = eng1Time2 - etEng12;
eng1Agent2Timer.setValue(timeToSetEng12);
@ -591,7 +591,7 @@ eng2AgentTimerMakeTimerFunc = func() {
eng2Agent2TimerMakeTimerFunc = func() {
if (eng2Agent2Timer.getValue() > 0) {
var eng2Time2 = eng2AgentTimerTime.getValue();
var eng2Time2 = eng2Agent2TimerTime.getValue();
var etEng22 = elapsedTime.getValue();
var timeToSetEng22 = eng2Time2 - etEng22;
eng2Agent2Timer.setValue(timeToSetEng22);