Merge branch 'dev' into preflight
This commit is contained in:
commit
ea68d8bb3e
18 changed files with 222 additions and 95 deletions
|
@ -1348,11 +1348,14 @@
|
|||
<spoiler-r4 type="bool">0</spoiler-r4>
|
||||
<spoiler-r5 type="bool">0</spoiler-r5>
|
||||
</spoilers>
|
||||
<engine-left-fire type="bool">0</engine-left-fire>
|
||||
<engine-right-fire type="bool">0</engine-right-fire>
|
||||
<apu-fire type="bool">0</apu-fire>
|
||||
<cargo-fwd-fire type="bool">0</cargo-fwd-fire>
|
||||
<cargo-aft-fire type="bool">0</cargo-aft-fire>
|
||||
<fire>
|
||||
<engine-left-fire type="bool">0</engine-left-fire>
|
||||
<engine-right-fire type="bool">0</engine-right-fire>
|
||||
<apu-fire type="bool">0</apu-fire>
|
||||
<cargo-fwd-fire type="bool">0</cargo-fwd-fire>
|
||||
<cargo-aft-fire type="bool">0</cargo-aft-fire>
|
||||
<lavatory-fire type="bool">0</lavatory-fire>
|
||||
</fire>
|
||||
</failures>
|
||||
|
||||
<fctl n="0">
|
||||
|
@ -1385,6 +1388,9 @@
|
|||
<temperature type="double">0</temperature>
|
||||
</fwd>
|
||||
</cargo>
|
||||
<lavatory>
|
||||
<temperature type="double">0</temperature>
|
||||
</lavatory>
|
||||
</fire>
|
||||
<fuel n="0">
|
||||
<only-use-ctr-tank type="bool">0</only-use-ctr-tank>
|
||||
|
|
|
@ -56,10 +56,12 @@ var failResetOld = func {
|
|||
setprop("/systems/failures/pump-green", 0);
|
||||
setprop("/systems/failures/pump-yellow-eng", 0);
|
||||
setprop("/systems/failures/pump-yellow-elec", 0);
|
||||
setprop("/systems/failures/cargo-aft-fire", 0);
|
||||
setprop("/systems/failures/cargo-fwd-fire", 0);
|
||||
setprop("/systems/failures/engine-left-fire", 0);
|
||||
setprop("/systems/failures/engine-right-fire", 0);
|
||||
setprop("/systems/failures/fire/cargo-aft-fire", 0);
|
||||
setprop("/systems/failures/fire/cargo-fwd-fire", 0);
|
||||
setprop("/systems/failures/fire/engine-left-fire", 0);
|
||||
setprop("/systems/failures/fire/apu-fire", 0);
|
||||
setprop("/systems/failures/fire/engine-right-fire", 0);
|
||||
setprop("/systems/failures/fire/lavatory-fire", 0);
|
||||
}
|
||||
|
||||
failResetOld();
|
||||
|
|
|
@ -560,7 +560,7 @@
|
|||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
<text>
|
||||
<label>Cargo Fire</label>
|
||||
<label>Fire</label>
|
||||
</text>
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
|
@ -568,9 +568,9 @@
|
|||
</group>
|
||||
|
||||
<checkbox>
|
||||
<label>AFT</label>
|
||||
<label>AFT CRG</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/cargo-aft-fire</property>
|
||||
<property>/systems/failures/fire/cargo-aft-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -578,15 +578,26 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>FWD</label>
|
||||
<label>FWD CRG</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/cargo-fwd-fire</property>
|
||||
<property>/systems/failures/fire/cargo-fwd-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
<group>
|
||||
|
||||
<checkbox>
|
||||
<label>LAV</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/fire/lavatory-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<hrule>
|
||||
|
@ -603,7 +614,7 @@
|
|||
<checkbox>
|
||||
<label>Left Engine</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/engine-left-fire</property>
|
||||
<property>/systems/failures/fire/engine-left-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -613,7 +624,7 @@
|
|||
<checkbox>
|
||||
<label>APU</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/apu-fire</property>
|
||||
<property>/systems/failures/fire/apu-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -623,7 +634,7 @@
|
|||
<checkbox>
|
||||
<label>Right Engine</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/engine-right-fire</property>
|
||||
<property>/systems/failures/fire/engine-right-fire</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[3]/n1</n1>
|
||||
<on-fire>systems/failures/engine-left-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-left-fire</on-fire>
|
||||
<contrail>engines/engine[0]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
|
||||
</params>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[4]/n1</n1>
|
||||
<on-fire>systems/failures/engine-right-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-right-fire</on-fire>
|
||||
<contrail>engines/engine[1]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
|
||||
</params>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[3]/n1</n1>
|
||||
<on-fire>systems/failures/engine-left-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-left-fire</on-fire>
|
||||
<contrail>engines/engine[0]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
|
||||
</params>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[4]/n1</n1>
|
||||
<on-fire>systems/failures/engine-right-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-right-fire</on-fire>
|
||||
<contrail>engines/engine[1]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
|
||||
</params>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[3]/n1</n1>
|
||||
<on-fire>systems/failures/engine-left-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-left-fire</on-fire>
|
||||
<contrail>engines/engine[0]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
|
||||
<pylon-model-path>Aircraft/A320-family/Models/Engines/XMLs/a320.pylon.cfm.left.xml</pylon-model-path>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[4]/n1</n1>
|
||||
<on-fire>systems/failures/engine-right-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-right-fire</on-fire>
|
||||
<contrail>engines/engine[1]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
|
||||
<pylon-model-path>Aircraft/A320-family/Models/Engines/XMLs/a320.pylon.cfm.right.xml</pylon-model-path>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[3]/n1</n1>
|
||||
<on-fire>systems/failures/engine-left-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-left-fire</on-fire>
|
||||
<contrail>engines/engine[0]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
|
||||
<pylon-model-path>Aircraft/A320-family/Models/Engines/XMLs/a320.pylon.iae.left.xml</pylon-model-path>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<params>
|
||||
<n1>engines/engine[4]/n1</n1>
|
||||
<on-fire>systems/failures/engine-right-fire</on-fire>
|
||||
<on-fire>systems/failures/fire/engine-right-fire</on-fire>
|
||||
<contrail>engines/engine[1]/contrail</contrail>
|
||||
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
|
||||
<pylon-model-path>Aircraft/A320-family/Models/Engines/XMLs/a320.pylon.iae.right.xml</pylon-model-path>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<z-m>0.95</z-m>
|
||||
</offsets>
|
||||
<condition>
|
||||
<property>systems/failures/apu-fire</property>
|
||||
<property>systems/failures/fire/apu-fire</property>
|
||||
</condition>
|
||||
</model>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<z-m>0.95</z-m>
|
||||
</offsets>
|
||||
<condition>
|
||||
<property>systems/failures/apu-fire</property>
|
||||
<property>systems/failures/fire/apu-fire</property>
|
||||
</condition>
|
||||
</model>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<z-m>0.95</z-m>
|
||||
</offsets>
|
||||
<condition>
|
||||
<property>systems/failures/apu-fire</property>
|
||||
<property>systems/failures/fire/apu-fire</property>
|
||||
</condition>
|
||||
</model>
|
||||
|
||||
|
|
|
@ -663,7 +663,7 @@ var messages_priority_3 = func {
|
|||
if (gearNotDownLocked.clearFlag == 0 and warningNodes.Logic.gearNotDownLocked.getBoolValue() and phaseVar3 != 3 and phaseVar3 != 4 and phaseVar3 != 5 and phaseVar3 != 8) {
|
||||
gearNotDownLocked.active = 1;
|
||||
|
||||
if (gearNotDownLockedRec.clearFlag == 0 and warningNodes.Logic.gearNotDownLockedFlipflop.getBoolValue()) {
|
||||
if (gearNotDownLockedRec.clearFlag == 0 and !warningNodes.Logic.gearNotDownLockedFlipflop.getBoolValue()) {
|
||||
gearNotDownLockedRec.active = 1;
|
||||
gearNotDownLockedWork.active = 1;
|
||||
} else {
|
||||
|
@ -721,47 +721,110 @@ var messages_priority_3 = func {
|
|||
altAlertFlash = 0;
|
||||
}
|
||||
|
||||
if (!systems.cargoTestBtn.getBoolValue()) {
|
||||
if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) {
|
||||
cargoSmokeFwd.active = 1;
|
||||
} elsif (cargoSmokeFwd.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) {
|
||||
ECAM_controller.warningReset(cargoSmokeFwd);
|
||||
cargoSmokeFwd.isMainMsg = 1;
|
||||
if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) {
|
||||
cargoSmokeFwd.active = 1;
|
||||
|
||||
if (cargoSmokeFwdFans.clearFlag == 0 and systems.PNEU.Switch.cabinFans.getValue()) {
|
||||
cargoSmokeFwdFans.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwdFans);
|
||||
}
|
||||
|
||||
if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("/systems/fire/cargo/disch")) {
|
||||
if (cargoSmokeFwdGrdClsd.clearFlag == 0 and (phaseVar3 == 1 or phaseVar3 == 10)) {
|
||||
cargoSmokeFwdGrdClsd.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwdGrdClsd);
|
||||
}
|
||||
|
||||
if (cargoSmokeFwdAgent.clearFlag == 0 and !systems.cargoExtinguisherBottles.vector[0].lightProp.getValue()) {
|
||||
cargoSmokeFwdAgent.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwdAgent);
|
||||
cargoSmokeFwd.isMainMsg = 0;
|
||||
}
|
||||
|
||||
if (cargoSmokeAft.clearFlag == 0 and systems.aftCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) {
|
||||
cargoSmokeAft.active = 1;
|
||||
} elsif (cargoSmokeAft.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) {
|
||||
ECAM_controller.warningReset(cargoSmokeAft);
|
||||
cargoSmokeAft.isMainMsg = 1;
|
||||
systems.cargoTestBtnOff.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("/systems/fire/cargo/disch")) {
|
||||
cargoSmokeAftAgent.active = 1;
|
||||
if (FWC.Timer.gnd.getValue() == 0) {
|
||||
cargoSmokeFwdGrd.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftAgent);
|
||||
cargoSmokeAft.isMainMsg = 0;
|
||||
ECAM_controller.warningReset(cargoSmokeFwdGrd);
|
||||
}
|
||||
|
||||
if (cargoSmokeFwdDoors.clearFlag == 0) {
|
||||
cargoSmokeFwdDoors.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwdDoors);
|
||||
}
|
||||
|
||||
if (cargoSmokeFwdDisemb.clearFlag == 0) {
|
||||
cargoSmokeFwdDisemb.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwdDisemb);
|
||||
}
|
||||
} else {
|
||||
if (systems.aftCargoFireWarn.getBoolValue()) {
|
||||
cargoSmokeFwd.active = 1;
|
||||
cargoSmokeFwdAgent.active = 1;
|
||||
cargoSmokeAft.active = 1;
|
||||
ECAM_controller.warningReset(cargoSmokeFwd);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdFans);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdGrdClsd);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdAgent);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdGrd);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdDoors);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdDisemb);
|
||||
systems.cargoTestBtnOff.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (cargoSmokeAft.clearFlag == 0 and systems.aftCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) {
|
||||
cargoSmokeAft.active = 1;
|
||||
|
||||
if (cargoSmokeAftFans.clearFlag == 0 and systems.PNEU.Switch.cabinFans.getValue()) {
|
||||
cargoSmokeAftFans.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftFans);
|
||||
}
|
||||
|
||||
if (cargoSmokeAftGrdClsd.clearFlag == 0 and (phaseVar3 == 1 or phaseVar3 == 10)) {
|
||||
cargoSmokeAftGrdClsd.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftGrdClsd);
|
||||
}
|
||||
|
||||
if (cargoSmokeAftAgent.clearFlag == 0 and !systems.cargoExtinguisherBottles.vector[1].lightProp.getValue()) {
|
||||
cargoSmokeAftAgent.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeFwd);
|
||||
ECAM_controller.warningReset(cargoSmokeFwdAgent);
|
||||
ECAM_controller.warningReset(cargoSmokeAft);
|
||||
ECAM_controller.warningReset(cargoSmokeAftAgent);
|
||||
}
|
||||
|
||||
if (FWC.Timer.gnd.getValue() == 0) {
|
||||
cargoSmokeAftGrd.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftGrd);
|
||||
}
|
||||
|
||||
if (cargoSmokeAftDoors.clearFlag == 0) {
|
||||
cargoSmokeAftDoors.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftDoors);
|
||||
}
|
||||
|
||||
if (cargoSmokeAftDisemb.clearFlag == 0) {
|
||||
cargoSmokeAftDisemb.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAftDisemb);
|
||||
}
|
||||
} else {
|
||||
ECAM_controller.warningReset(cargoSmokeAft);
|
||||
ECAM_controller.warningReset(cargoSmokeAftFans);
|
||||
ECAM_controller.warningReset(cargoSmokeAftGrdClsd);
|
||||
ECAM_controller.warningReset(cargoSmokeAftAgent);
|
||||
ECAM_controller.warningReset(cargoSmokeAftGrd);
|
||||
ECAM_controller.warningReset(cargoSmokeAftDoors);
|
||||
ECAM_controller.warningReset(cargoSmokeAftDisemb);
|
||||
systems.cargoTestBtnOff.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (lavatorySmoke.clearFlag == 0 and systems.lavatoryFireWarn.getValue() and phaseVar3 != 4 and phaseVar3 != 5 and phaseVar3 != 7 and phaseVar3 != 8) {
|
||||
lavatorySmoke.active = 1;
|
||||
lavatorySmokeComm.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(lavatorySmoke);
|
||||
ECAM_controller.warningReset(lavatorySmokeComm);
|
||||
}
|
||||
|
||||
# ESS on BAT
|
||||
|
@ -2537,7 +2600,7 @@ var messages_right_memo = func {
|
|||
ldg_inhibit.active = 0;
|
||||
}
|
||||
|
||||
if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) {
|
||||
if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/fire/cargo-aft-fire") == 1 or getprop("/systems/failures/fire/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) {
|
||||
# todo: emer elec
|
||||
land_asap_r.active = 1;
|
||||
} else {
|
||||
|
|
|
@ -161,8 +161,8 @@ var warnings = std.Vector.new([
|
|||
|
||||
var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"),
|
||||
var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "c"),
|
||||
var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "c"),
|
||||
var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "w", isMainMsg: 1),
|
||||
var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "w"),
|
||||
var gearNotDownLockedGrav = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
|
||||
|
||||
# Autopilot off involuntary
|
||||
|
@ -170,15 +170,29 @@ var warnings = std.Vector.new([
|
|||
|
||||
# Cargo smoke
|
||||
var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
var cargoSmokeFwdFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"),
|
||||
var cargoSmokeFwdGrdClsd = warning.new(msg: " •IF FWD CRG CLSD:", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
|
||||
var cargoSmokeFwdGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeFwdDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeFwdDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"),
|
||||
var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
var cargoSmokeAftFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"),
|
||||
var cargoSmokeAftGrdClsd = warning.new(msg: " •IF AFT CRG CLSD:", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
|
||||
var cargoSmokeAftGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeAftDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w", isMainMsg: 1),
|
||||
var cargoSmokeAftDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"),
|
||||
|
||||
# Lavatory SMOKE
|
||||
var lavatorySmoke = warning.new(msg: "SMOKE LAVATORY SMOKE ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
var lavatorySmokeComm = warning.new(msg: "-CKPT/CAB COM.ESTABLISH ", colour: "c"),
|
||||
|
||||
# ESS Bus on Bat
|
||||
var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w"),
|
||||
var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w", isMainMsg: 1),
|
||||
var essBusOnBatManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
|
||||
var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w"),
|
||||
var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w", isMainMsg: 1),
|
||||
var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......180 KT", colour: "c"),
|
||||
var essBusOnBatLGCB = warning.new(msg: " -LGCIU1 C/B (C09)..PULL", colour: "c"),
|
||||
var essBusOnBatManOn2 = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
|
||||
|
|
|
@ -17,6 +17,7 @@ var cargoTestBtnOff = props.globals.initNode("/controls/fire/cargo/test-off", 0,
|
|||
var eng1FireWarn = props.globals.initNode("/systems/fire/engine1/warning-active", 0, "BOOL");
|
||||
var eng2FireWarn = props.globals.initNode("/systems/fire/engine2/warning-active", 0, "BOOL");
|
||||
var apuFireWarn = props.globals.initNode("/systems/fire/apu/warning-active", 0, "BOOL");
|
||||
var lavatoryFireWarn = props.globals.getNode("/systems/fire/lavatory/warning", 1);
|
||||
var eng1Inop = props.globals.initNode("/systems/fire/engine1/det-inop", 0, "BOOL");
|
||||
var eng2Inop = props.globals.initNode("/systems/fire/engine2/det-inop", 0, "BOOL");
|
||||
var apuInop = props.globals.initNode("/systems/fire/apu/det-inop", 0, "BOOL");
|
||||
|
@ -40,8 +41,8 @@ var fire_init = func {
|
|||
setprop("/controls/OH/protectors/aftdisch", 0);
|
||||
setprop("/controls/fire/cargo/fwddisch", 0);
|
||||
setprop("/controls/fire/cargo/aftdisch", 0);
|
||||
setprop("/systems/failures/cargo-fwd-fire", 0);
|
||||
setprop("/systems/failures/cargo-aft-fire", 0);
|
||||
setprop("/systems/failures/fire/cargo-fwd-fire", 0);
|
||||
setprop("/systems/failures/fire/cargo-aft-fire", 0);
|
||||
setprop("/controls/fire/cargo/test", 0);
|
||||
fire_timer.start();
|
||||
}
|
||||
|
@ -278,9 +279,9 @@ var detectorLoop = {
|
|||
}
|
||||
},
|
||||
sendSignal: func(system, typeLoop) {
|
||||
if (system == 0 and !getprop("/systems/failures/engine-left-fire")) { return; }
|
||||
elsif (system == 1 and !getprop("/systems/failures/engine-right-fire")) { return; }
|
||||
elsif (system == 2 and !getprop("/systems/failures/apu-fire")) { return; }
|
||||
if (system == 0 and !getprop("/systems/failures/fire/engine-left-fire")) { return; }
|
||||
elsif (system == 1 and !getprop("/systems/failures/fire/engine-right-fire")) { return; }
|
||||
elsif (system == 2 and !getprop("/systems/failures/fire/apu-fire")) { return; }
|
||||
engFireDetectorUnits.vector[system].receiveSignal(typeLoop);
|
||||
}
|
||||
};
|
||||
|
@ -305,8 +306,8 @@ var cargoDetectorLoop = {
|
|||
}
|
||||
},
|
||||
sendSignal: func(system, typeLoop) {
|
||||
if ((system == 0 or system == 1) and !getprop("/systems/failures/cargo-aft-fire")) { return; }
|
||||
elsif (system == 2 and !getprop("/systems/failures/cargo-fwd-fire")) { return; }
|
||||
if ((system == 0 or system == 1) and !getprop("/systems/failures/fire/cargo-aft-fire")) { return; }
|
||||
elsif (system == 2 and !getprop("/systems/failures/fire/cargo-fwd-fire")) { return; }
|
||||
|
||||
cargoSmokeDetectorUnits.vector[system].receiveSignal(typeLoop);
|
||||
}
|
||||
|
@ -490,29 +491,29 @@ var checkTwoInop2Timer = maketimer(0.1, checkTwoInop2);
|
|||
var checkTwoInop3Timer = maketimer(0.1, checkTwoInop3);
|
||||
|
||||
# Create fire systems
|
||||
var engFireDetectorUnits = std.Vector.new([ engFireDetectorUnit.new(0, "/systems/failures/engine-left-fire", "/controls/fire/test-btn-1"), engFireDetectorUnit.new(1, "/systems/failures/engine-right-fire", "/controls/fire/test-btn-2"), engFireDetectorUnit.new(2, "/systems/failures/apu-fire", "/controls/fire/apu-test-btn") ]);
|
||||
var cargoSmokeDetectorUnits = std.Vector.new([cargoSmokeDetectorUnit.new(0, "/systems/failures/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/cargo-fwd-fire")]);
|
||||
var engFireDetectorUnits = std.Vector.new([ engFireDetectorUnit.new(0, "/systems/failures/fire/engine-left-fire", "/controls/fire/test-btn-1"), engFireDetectorUnit.new(1, "/systems/failures/fire/engine-right-fire", "/controls/fire/test-btn-2"), engFireDetectorUnit.new(2, "/systems/failures/fire/apu-fire", "/controls/fire/apu-test-btn") ]);
|
||||
var cargoSmokeDetectorUnits = std.Vector.new([cargoSmokeDetectorUnit.new(0, "/systems/failures/fire/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/fire/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/fire/cargo-fwd-fire")]);
|
||||
|
||||
# Create detector loops
|
||||
var engDetectorLoops = std.Vector.new([
|
||||
detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire"),
|
||||
detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-right-fire"),
|
||||
detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire")
|
||||
detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/fire/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-left-fire"),
|
||||
detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/fire/engine-right-fire"),
|
||||
detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire")
|
||||
]);
|
||||
|
||||
var cargoDetectorLoops = std.Vector.new([
|
||||
cargoDetectorLoop.new(0, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), cargoDetectorLoop.new(0, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"),
|
||||
cargoDetectorLoop.new(1, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), cargoDetectorLoop.new(1, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"),
|
||||
cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/failures/cargo-fwd-fire"), cargoDetectorLoop.new(2, 2, "/systems/fire/cargo/fwd/temperature", "/systems/failures/cargo-fwd-fire")
|
||||
cargoDetectorLoop.new(0, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), cargoDetectorLoop.new(0, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"),
|
||||
cargoDetectorLoop.new(1, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), cargoDetectorLoop.new(1, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"),
|
||||
cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/failures/fire/cargo-fwd-fire"), cargoDetectorLoop.new(2, 2, "/systems/fire/cargo/fwd/temperature", "/systems/failures/fire/cargo-fwd-fire")
|
||||
]);
|
||||
|
||||
# Create extinguisher bottles
|
||||
var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-hot-1", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"),
|
||||
extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dc-hot-2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"),
|
||||
extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire", "/systems/fire/apu/warning-active") ]);
|
||||
var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-hot-1", "/systems/failures/fire/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-left-fire", "/systems/fire/engine1/warning-active"),
|
||||
extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dc-hot-2", "/systems/failures/fire/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-right-fire", "/systems/fire/engine2/warning-active"),
|
||||
extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire", "/systems/fire/apu/warning-active") ]);
|
||||
|
||||
# There is only one bottle but the system will think there are two, so other parts work
|
||||
var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]);
|
||||
var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]);
|
||||
|
||||
# Create CIDS channels
|
||||
var CIDSchannels = std.Vector.new([CIDSchannel.new("/systems/electrical/bus/dc-ess"), CIDSchannel.new("/systems/electrical/bus/dc-2")]);
|
||||
|
@ -654,7 +655,7 @@ apuAgentTimerMakeTimerFunc = func() {
|
|||
}
|
||||
|
||||
setlistener("/controls/fire/test-btn-1", func() {
|
||||
if (getprop("/systems/failures/engine-left-fire")) { return; }
|
||||
if (getprop("/systems/failures/fire/engine-left-fire")) { return; }
|
||||
|
||||
if (testBtn.getValue() == 1) {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) {
|
||||
|
@ -667,7 +668,7 @@ setlistener("/controls/fire/test-btn-1", func() {
|
|||
}, 0, 0);
|
||||
|
||||
setlistener("/controls/fire/test-btn-2", func() {
|
||||
if (getprop("/systems/failures/engine-right-fire")) { return; }
|
||||
if (getprop("/systems/failures/fire/engine-right-fire")) { return; }
|
||||
if (testBtn2.getValue() == 1) {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) {
|
||||
eng2FireWarn.setBoolValue(1);
|
||||
|
@ -679,7 +680,7 @@ setlistener("/controls/fire/test-btn-2", func() {
|
|||
}, 0, 0);
|
||||
|
||||
setlistener("/controls/fire/apu-test-btn", func() {
|
||||
if (getprop("/systems/failures/apu-fire")) { return; }
|
||||
if (getprop("/systems/failures/fire/apu-fire")) { return; }
|
||||
if (apuTestBtn.getValue() == 1) {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) {
|
||||
apuFireWarn.setBoolValue(1);
|
||||
|
@ -691,7 +692,7 @@ setlistener("/controls/fire/apu-test-btn", func() {
|
|||
}, 0, 0);
|
||||
|
||||
setlistener("/controls/fire/cargo/test", func() {
|
||||
if (getprop("/systems/failures/aft-cargo-fire") or getprop("/systems/failures/fwd-cargo-fire") or systems.ELEC.Bus.dcBat.getValue() < 25 or systems.ELEC.Bus.dcEss.getValue() < 25) { return; }
|
||||
if (getprop("/systems/failures/fire/aft-cargo-fire") or getprop("/systems/failures/fire/fwd-cargo-fire") or systems.ELEC.Bus.dcBat.getValue() < 25 or systems.ELEC.Bus.dcEss.getValue() < 25) { return; }
|
||||
if (cargoTestBtn.getBoolValue()) {
|
||||
cargoTestTime.setValue(elapsedTime.getValue());
|
||||
cargoTestChecker.start();
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<system name="A320: Engine Fire">
|
||||
|
||||
<channel name="Engine Fire" execrate="8">
|
||||
<fcs_function name="enginefire1">
|
||||
<fcs_function name="rubbish/enginefire1">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/engine1/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/engine-left-fire</independentVar>
|
||||
<independentVar lookup="row">/systems/failures/fire/engine-left-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 30
|
||||
|
@ -26,13 +26,13 @@
|
|||
<output>/systems/fire/engine1/temperature</output>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="enginefire2">
|
||||
<fcs_function name="rubbish/enginefire2">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/engine2/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/engine-right-fire</independentVar>
|
||||
<independentVar lookup="row">/systems/failures/fire/engine-right-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 30
|
||||
|
@ -49,13 +49,13 @@
|
|||
<output>/systems/fire/engine2/temperature</output>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="apufire">
|
||||
<fcs_function name="rubbish/apufire">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/apu/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/apu-fire</independentVar>
|
||||
<independentVar lookup="row">/systems/failures/fire/apu-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 45
|
||||
|
@ -74,13 +74,13 @@
|
|||
</channel>
|
||||
|
||||
<channel name="Cargo Fire" execrate="8">
|
||||
<fcs_function name="fwdfire">
|
||||
<fcs_function name="rubbish/fwdfire">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/cargo/fwd/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/cargo-fwd-fire</independentVar>
|
||||
<independentVar lookup="row">/systems/failures/fire/cargo-fwd-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 30
|
||||
|
@ -97,13 +97,13 @@
|
|||
<output>/systems/fire/cargo/fwd/temperature</output>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="aftfire">
|
||||
<fcs_function name="rubbish/aftfire">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/cargo/aft/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/cargo-aft-fire</independentVar>
|
||||
<independentVar lookup="row">/systems/failures/fire/cargo-aft-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 45
|
||||
|
@ -119,5 +119,35 @@
|
|||
</clipto>
|
||||
<output>/systems/fire/cargo/aft/temperature</output>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="rubbish/lavatory">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/fire/lavatory/temperature</property>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/failures/fire/lavatory-fire</independentVar>
|
||||
<tableData>
|
||||
0 -5
|
||||
1 45
|
||||
</tableData>
|
||||
</table>
|
||||
<property>simulation/channel-dt</property>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>300</max>
|
||||
</clipto>
|
||||
<output>/systems/fire/lavatory/temperature</output>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="/systems/fire/lavatory/warning">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/fire/lavatory/temperature ge 295
|
||||
</test>
|
||||
</switch>
|
||||
</channel>
|
||||
</system>
|
||||
|
|
Loading…
Add table
Reference in a new issue