CARGO SMOKE DET FAULT, fix bugs

This commit is contained in:
legoboyvdlp R 2019-05-01 15:26:15 +01:00
parent 8e8f063f5d
commit 57d53da6f5
2 changed files with 23 additions and 9 deletions

View file

@ -799,13 +799,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng1FireDetFault); ECAM_controller.warningReset(eng1FireDetFault);
} }
if (eng1LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo != 9) { if (eng1LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo != 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng1LoopAFault.active = 1; eng1LoopAFault.active = 1;
} else { } else {
ECAM_controller.warningReset(eng1LoopAFault); ECAM_controller.warningReset(eng1LoopAFault);
} }
if (eng1LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne != 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9) { if (eng1LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne != 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng1LoopBFault.active = 1; eng1LoopBFault.active = 1;
} else { } else {
ECAM_controller.warningReset(eng1LoopBFault); ECAM_controller.warningReset(eng1LoopBFault);
@ -817,13 +817,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng2FireDetFault); ECAM_controller.warningReset(eng2FireDetFault);
} }
if (eng2LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne == 9 and systems.engFireDetectorUnits.vector[1].loopTwo != 9) { if (eng2LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne == 9 and systems.engFireDetectorUnits.vector[1].loopTwo != 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng2LoopAFault.active = 1; eng2LoopAFault.active = 1;
} else { } else {
ECAM_controller.warningReset(eng2LoopAFault); ECAM_controller.warningReset(eng2LoopAFault);
} }
if (eng2LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne != 9 and systems.engFireDetectorUnits.vector[1].loopTwo == 9) { if (eng2LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne != 9 and systems.engFireDetectorUnits.vector[1].loopTwo == 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng2LoopBFault.active = 1; eng2LoopBFault.active = 1;
} else { } else {
ECAM_controller.warningReset(eng2LoopBFault); ECAM_controller.warningReset(eng2LoopBFault);
@ -835,17 +835,29 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(apuFireDetFault); ECAM_controller.warningReset(apuFireDetFault);
} }
if (apuLoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne == 9 and systems.engFireDetectorUnits.vector[2].loopTwo != 9) { if (apuLoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne == 9 and systems.engFireDetectorUnits.vector[2].loopTwo != 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuLoopAFault.active = 1; apuLoopAFault.active = 1;
} else { } else {
ECAM_controller.warningReset(apuLoopAFault); ECAM_controller.warningReset(apuLoopAFault);
} }
if (apuLoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne != 9 and systems.engFireDetectorUnits.vector[2].loopTwo == 9) { if (apuLoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne != 9 and systems.engFireDetectorUnits.vector[2].loopTwo == 9 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuLoopBFault.active = 1; apuLoopBFault.active = 1;
} else { } else {
ECAM_controller.warningReset(apuLoopBFault); ECAM_controller.warningReset(apuLoopBFault);
} }
if (crgAftFireDetFault.clearFlag == 0 and (cargoSmokeDetectorUnits.vector[0].condition == 0 or cargoSmokeDetectorUnits.vector[1].condition == 0) and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
crgAftFireDetFault.active = 1;
} else {
ECAM_controller.warningReset(crgAftFireDetFault);
}
if (crgFwdFireDetFault.clearFlag == 0 and cargoSmokeDetectorUnits.vector[2].condition == 0 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
crgFwdFireDetFault.active = 1;
} else {
ECAM_controller.warningReset(crgFwdFireDetFault);
}
} }
var messages_priority_1 = func {} var messages_priority_1 = func {}

View file

@ -136,15 +136,17 @@ var warnings = std.Vector.new([
var apuEmerShutdownMast = warning.new(msg: " -MASTER SW..........OFF", colour: "c"), var apuEmerShutdownMast = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),
# FIRE det fault # FIRE det fault
var eng1FireDetFault = warning.new(msg: "ENG 1 FIRE DET FAULT", colour: "a", aura: 1, light: 1), var eng1FireDetFault = warning.new(msg: "ENG 1 FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var eng1LoopAFault = warning.new(msg: "ENG 1 FIRE LOOP A FAULT", colour: "a"), var eng1LoopAFault = warning.new(msg: "ENG 1 FIRE LOOP A FAULT", colour: "a"),
var eng1LoopBFault = warning.new(msg: "ENG 1 FIRE LOOP B FAULT", colour: "a"), var eng1LoopBFault = warning.new(msg: "ENG 1 FIRE LOOP B FAULT", colour: "a"),
var eng2FireDetFault = warning.new(msg: "ENG 2 FIRE DET FAULT", colour: "a", aura: 1, light: 1), var eng2FireDetFault = warning.new(msg: "ENG 2 FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var eng2LoopAFault = warning.new(msg: "ENG 2 FIRE LOOP A FAULT", colour: "a"), var eng2LoopAFault = warning.new(msg: "ENG 2 FIRE LOOP A FAULT", colour: "a"),
var eng2LoopBFault = warning.new(msg: "ENG 2 FIRE LOOP B FAULT", colour: "a"), var eng2LoopBFault = warning.new(msg: "ENG 2 FIRE LOOP B FAULT", colour: "a"),
var apuFireDetFault = warning.new(msg: "APU FIRE DET FAULT", colour: "a", aura: 1, light: 1), var apuFireDetFault = warning.new(msg: "APU FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var apuLoopAFault = warning.new(msg: "APU FIRE LOOP A FAULT", colour: "a"), var apuLoopAFault = warning.new(msg: "APU FIRE LOOP A FAULT", colour: "a"),
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"), var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a"),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a"),
]); ]);
var leftmemos = std.Vector.new([ var leftmemos = std.Vector.new([