From 450a3d6e25f7a0203eb9531b18d7ab0d8371aafc Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 2 Jan 2020 11:25:47 +0000 Subject: [PATCH] Fix the fire buttons powersupply in EMER ELEC --- Models/Instruments/OHpanel/OHpanel.xml | 252 +++++++++++++++++++++---- Nasal/ECAM/ECAM-logic.nas | 2 +- Nasal/Systems/fire.nas | 4 +- 3 files changed, 217 insertions(+), 41 deletions(-) diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index dfd85dc8..aec373f3 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -40,14 +40,6 @@ ELAC1Btn1F ELAC1Btn2O EmerExtLtBtn2O - Eng1FireAgt1Btn1S - Eng1FireAgt1Btn2D - Eng1FireAgt2Btn1S - Eng1FireAgt2Btn2D - Eng2FireAgt1Btn1S - Eng2FireAgt1Btn2D - Eng2FireAgt2Btn1S - Eng2FireAgt2Btn2D ExtPwrBtn2O FAC1Btn1F FAC1Btn2O @@ -65,10 +57,18 @@ SEC1Btn1F SEC1Btn2O VentBlowBtn1F + Eng1FireAgt1Btn1S + Eng1FireAgt1Btn2D + Eng2FireAgt1Btn1S + Eng2FireAgt1Btn2D + Eng1FireAgt2Btn1S + Eng1FireAgt2Btn2D + Eng2FireAgt2Btn1S + Eng2FireAgt2Btn2D systems/electrical/bus/ac-ess - 25 + 5 @@ -167,7 +167,7 @@ - + select @@ -6484,6 +6484,18 @@ property-assign controls/engines/engine[0]/agent1-btn 1 + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + @@ -6500,6 +6512,12 @@ property-assign controls/engines/engine[0]/agent2-btn 1 + + + systems/electrical/bus/dc-2 + 25 + + @@ -6507,22 +6525,60 @@ select Eng1FireAgt1Btn1S + + + + + controls/engines/engine[0]/fire-btn + 1 + + + /controls/fire/test-btn-1 + 1 + + + controls/switches/annun-test + 1 + + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + + + + + + select Eng1FireAgt2Btn1S - - - controls/engines/engine[0]/fire-btn - 1 - - - /controls/fire/test-btn-1 - 1 - - - controls/switches/annun-test - 1 - - + + + + controls/engines/engine[0]/fire-btn + 1 + + + /controls/fire/test-btn-1 + 1 + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-2 + 25 + + @@ -6579,6 +6635,24 @@ property-assign controls/fire/test-btn-1 1 + + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + + systems/electrical/bus/dc-2 + 25 + + + @@ -6600,6 +6674,24 @@ property-assign controls/fire/test-btn-2 1 + + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + + systems/electrical/bus/dc-2 + 25 + + + @@ -6621,6 +6713,18 @@ property-assign controls/fire/apu-test-btn 1 + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + @@ -6733,6 +6837,22 @@ property-assign controls/APU/agent-btn 1 + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + systems/electrical/bus/dc-bat + 25 + + + @@ -6880,6 +7000,18 @@ property-assign controls/engines/engine[1]/agent1-btn 1 + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + @@ -6896,6 +7028,12 @@ property-assign controls/engines/engine[1]/agent2-btn 1 + + + systems/electrical/bus/dc-2 + 25 + + @@ -6903,22 +7041,60 @@ select Eng2FireAgt1Btn1S + + + + + controls/engines/engine[1]/fire-btn + 1 + + + /controls/fire/test-btn-2 + 1 + + + controls/switches/annun-test + 1 + + + + + systems/electrical/bus/dc-hot-1 + 25 + + + systems/electrical/bus/dc-hot-2 + 25 + + + + + + + + select Eng2FireAgt2Btn1S - - - controls/engines/engine[1]/fire-btn - 1 - - - controls/fire/test-btn-2 - 1 - - - controls/switches/annun-test - 1 - - + + + + controls/engines/engine[1]/fire-btn + 1 + + + /controls/fire/test-btn-2 + 1 + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-2 + 25 + + diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 7522adc5..cb4145d8 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1363,7 +1363,7 @@ var messages_config_memo = func { setprop("/ECAM/ldg-memo-2200-set", 0); } - if (phaseVar >= 6 and phaseVar <= 8) { + if (phaseVar != 6 and phaseVar != 7 and phaseVar != 8) { setprop("/ECAM/ldg-memo-2200-reset", 1); } else { setprop("/ECAM/ldg-memo-2200-reset", 0); diff --git a/Nasal/Systems/fire.nas b/Nasal/Systems/fire.nas index d250b14c..69568578 100644 --- a/Nasal/Systems/fire.nas +++ b/Nasal/Systems/fire.nas @@ -521,8 +521,8 @@ cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/fai ]); # Create extinguisher bottles -var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-bat", "/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-bat", "/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"), +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") ]); # There is only one bottle but the system will think there are two, so other parts work