diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml
index ca52e330..123163b5 100644
--- a/AircraftConfig/fail.xml
+++ b/AircraftConfig/fail.xml
@@ -203,6 +203,16 @@
true
+
+
+ left
+ /systems/failures/ventfan
+
+ dialog-apply
+
+ true
+
+
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index 68facda6..93546daf 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -9,6 +9,7 @@ var lowerECAM_apu = nil;
var lowerECAM_eng = nil;
var lowerECAM_fctl = nil;
var lowerECAM_wheel = nil;
+var lowerECAM_elec = nil;
var lowerECAM_display = nil;
var page = "eng";
var oat = getprop("/environment/temperature-degc");
@@ -30,6 +31,10 @@ var accum = 0;
setprop("/systems/electrical/extra/apu-load", 0);
setprop("/systems/electrical/extra/apu-volts", 0);
setprop("/systems/electrical/extra/apu-hz", 0);
+setprop("/systems/electrical/bat1direction", 0);
+setprop("/systems/electrical/bat2direction", 0);
+setprop("/ECAM/Lower/bat1-contactrotation", 0);
+setprop("/ECAM/Lower/bat2-contactrotation", 0);
setprop("/systems/pneumatic/bleedapu", 0);
setprop("/engines/engine[0]/oil-psi-actual", 0);
setprop("/engines/engine[1]/oil-psi-actual", 0);
@@ -109,17 +114,26 @@ var canvas_lowerECAM_base = {
lowerECAM_fctl.page.hide();
lowerECAM_wheel.page.show();
lowerECAM_wheel.update();
+ } else if (page == "elec") {
+ lowerECAM_apu.page.hide();
+ lowerECAM_eng.page.hide();
+ lowerECAM_fctl.page.hide();
+ lowerECAM_wheel.page.hide();
+ lowerECAM_elec.page.show();
+ lowerECAM_elec.update();
} else {
lowerECAM_apu.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_wheel.page.hide();
+ lowerECAM_elec.page.hide();
}
} else {
lowerECAM_apu.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_wheel.page.hide();
+ lowerECAM_elec.page.hide();
}
},
updateBottomStatus: func() {
@@ -1016,7 +1030,7 @@ var canvas_lowerECAM_wheel = {
} else {
me["spoiler3Lf"].hide();
}
- } else {
+ } else {
me["spoiler3Lex"].setColor(0.0509,0.7529,0.2941);
me["spoiler3Lrt"].setColor(0.0509,0.7529,0.2941);
me["spoiler3Lf"].hide();
@@ -1133,6 +1147,133 @@ var canvas_lowerECAM_wheel = {
},
};
+var canvas_lowerECAM_elec = {
+ new: func(canvas_group, file) {
+ var m = {parents: [canvas_lowerECAM_elec, canvas_lowerECAM_base]};
+ m.init(canvas_group, file);
+
+ return m;
+ },
+ getKeys: func() {
+ return ["TAT","SAT","GW","BAT1connectorA","BAT1connectorB","BAT2connectorA","BAT2connectorB","BAT1volts","BAT1amps","BAT1v","BAT1a","BAT1off","BAT2volts","BAT2amps","BAT2v","BAT2a","BAT2off","TR1volts","TR1amps","TR2volts","TR2amps","EMERGENvolts","EXTvolts","EXThz",
+ "DCbattext","ESSTRvolts","ESSTRv","ESSTRamps","ESSTRa","ESSTRvolts","ESSTRbox","EMERGENtoESSTRarrow","ESSTRtoDCESSline"];
+ },
+ update: func() {
+ if (getprop("/controls/electrical/switches/battery1") == 0) {
+ me["BAT1volts"].hide();
+ me["BAT1amps"].hide();
+ me["BAT1v"].hide();
+ me["BAT1a"].hide();
+ me["BAT1off"].show();
+ } else {
+ me["BAT1volts"].show();
+ me["BAT1amps"].show();
+ me["BAT1v"].show();
+ me["BAT1a"].show();
+ me["BAT1off"].hide();
+ }
+ if (getprop("/controls/electrical/switches/battery2") == 0) {
+ me["BAT2volts"].hide();
+ me["BAT2amps"].hide();
+ me["BAT2v"].hide();
+ me["BAT2a"].hide();
+ me["BAT2off"].show();
+ } else {
+ me["BAT2volts"].show();
+ me["BAT2amps"].show();
+ me["BAT2v"].show();
+ me["BAT2a"].show();
+ me["BAT2off"].hide();
+ }
+
+ if (getprop("/systems/electrical/battery1-contact") == 0 and getprop("/systems/electrical/bat1direction") == 0) {
+ me["BAT1connectorA"].hide();
+ me["BAT1connectorB"].hide();
+ } else if (getprop("/systems/electrical/battery1-contact") == 1 and getprop("/systems/electrical/bat1direction") == -1) {
+ me["BAT1connectorA"].hide();
+ me["BAT1connectorB"].show();
+ me["BAT1connectorB"].setRotation(getprop("/ECAM/Lower/bat1-contactrotation") * D2R);
+ } else if (getprop("/systems/electrical/battery1-contact") == 1 and getprop("/systems/electrical/bat1direction") == 2) {
+ me["BAT1connectorA"].show();
+ me["BAT1connectorB"].hide();
+ } else if (getprop("/systems/electrical/battery1-contact") == 1 and getprop("/systems/electrical/bat1direction") == 1) {
+ me["BAT1connectorA"].hide();
+ me["BAT1connectorB"].show();
+ me["BAT1connectorB"].setRotation(getprop("/ECAM/Lower/bat2-contactrotation") * D2R);
+ }
+
+ if (getprop("/systems/electrical/battery2-contact") == 0 and getprop("/systems/electrical/bat2direction") == 0) {
+ me["BAT2connectorA"].hide();
+ me["BAT2connectorB"].hide();
+ } else if (getprop("/systems/electrical/battery2-contact") == 1 and getprop("/systems/electrical/bat2direction") == -1) {
+ me["BAT2connectorA"].hide();
+ me["BAT2connectorB"].show();
+ me["BAT2connectorB"].setRotation(getprop("/ECAM/Lower/bat2-contactrotation") * D2R);
+ } else if (getprop("/systems/electrical/battery2-contact") == 1 and getprop("/systems/electrical/bat2direction") == 2) {
+ me["BAT2connectorA"].show();
+ me["BAT2connectorB"].hide();
+ } else if (getprop("/systems/electrical/battery2-contact") == 1 and getprop("/systems/electrical/bat2direction") == 1) {
+ me["BAT2connectorA"].hide();
+ me["BAT2connectorB"].show();
+ me["BAT2connectorB"].setRotation(getprop("/ECAM/Lower/bat2-contactrotation") * D2R);
+ }
+
+ if (getprop("/systems/electrical/bus/dcbat") < 25) {
+ me["DCbattext"].setColor(0.7333,0.3803,0);
+ } else {
+ me["DCbattext"].setColor(0.0667,0.9450,0.3686);
+ }
+
+ if (getprop("/systems/electrical/bus/dc1") < 25) {
+ me["TR1volts"].setColor(0.7333,0.3803,0);
+ } else {
+ me["TR1volts"].setColor(0.0667,0.9450,0.3686);
+ }
+
+ if (getprop("/systems/electrical/bus/dc2") < 25) {
+ me["TR2volts"].setColor(0.7333,0.3803,0);
+ } else {
+ me["TR2volts"].setColor(0.0667,0.9450,0.3686);
+ }
+
+ if (getprop("/systems/electrical/bus/dc1-amps") <= 5) {
+ me["TR1amps"].setColor(0.7333,0.3803,0);
+ } else {
+ me["TR1amps"].setColor(0.0667,0.9450,0.3686);
+ }
+
+ if (getprop("/systems/electrical/bus/dc2-amps") <= 5) {
+ me["TR2amps"].setColor(0.7333,0.3803,0);
+ } else {
+ me["TR2amps"].setColor(0.0667,0.9450,0.3686);
+ }
+
+ me["BAT1volts"].setText(sprintf("%2.0f", getprop("/systems/electrical/battery1-volts")));
+ me["BAT2volts"].setText(sprintf("%2.0f", getprop("/systems/electrical/battery2-volts")));
+ me["BAT1amps"].setText(sprintf("%3.0f", getprop("/systems/electrical/battery1-amps")));
+ me["BAT2amps"].setText(sprintf("%3.0f", getprop("/systems/electrical/battery2-amps")));
+
+ me["TR1volts"].setText(sprintf("%2.0f", getprop("/systems/electrical/bus/dc1")));
+ me["TR1amps"].setText(sprintf("%2.0f", getprop("/systems/electrical/bus/dc1-amps")));
+ me["TR2volts"].setText(sprintf("%2.0f", getprop("/systems/electrical/bus/dc2")));
+ me["TR2amps"].setText(sprintf("%2.0f", getprop("/systems/electrical/bus/dc2-amps")));
+
+
+ me["EXTvolts"].setText(sprintf("%2.0f", getprop("/systems/electrical/extra/ext-volts")));
+ me["EXThz"].setText(sprintf("%2.0f", getprop("/systems/electrical/extra/ext-hz")));
+
+ me["ESSTRvolts"].hide();
+ me["ESSTRv"].hide();
+ me["ESSTRamps"].hide();
+ me["ESSTRa"].hide();
+ me["ESSTRvolts"].hide();
+ me["ESSTRbox"].hide();
+ me["EMERGENtoESSTRarrow"].hide();
+ me["ESSTRtoDCESSline"].hide();
+ me.updateBottomStatus();
+ },
+};
+
setlistener("sim/signals/fdm-initialized", func {
lowerECAM_display = canvas.new({
"name": "lowerECAM",
@@ -1145,11 +1286,13 @@ setlistener("sim/signals/fdm-initialized", func {
var groupEng = lowerECAM_display.createGroup();
var groupFctl = lowerECAM_display.createGroup();
var groupWheel = lowerECAM_display.createGroup();
+ var groupElec = lowerECAM_display.createGroup();
lowerECAM_apu = canvas_lowerECAM_apu.new(groupApu, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/apu.svg");
lowerECAM_eng = canvas_lowerECAM_eng.new(groupEng, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/eng-eis2.svg");
lowerECAM_fctl = canvas_lowerECAM_fctl.new(groupFctl, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/fctl.svg");
lowerECAM_wheel = canvas_lowerECAM_wheel.new(groupWheel, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/wheel.svg");
+ lowerECAM_elec = canvas_lowerECAM_elec.new(groupElec, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/elec.svg");
lowerECAM_update.start();
});
diff --git a/Models/Instruments/Lower-ECAM/res/elec.svg b/Models/Instruments/Lower-ECAM/res/elec.svg
new file mode 100644
index 00000000..460b044f
--- /dev/null
+++ b/Models/Instruments/Lower-ECAM/res/elec.svg
@@ -0,0 +1,1560 @@
+
+
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 71c6f0f3..aff098a3 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -17,9 +17,7 @@
select
ACESSFeedBtn1F
ACESSFeedBtn2O
- ACPack1Btn1F
ACPack1Btn2O
- ACPack2Btn1F
ACPack2Btn2O
APUBleedBtn1F
APUBleedBtn2O
@@ -47,11 +45,19 @@
Eng2FireAgt2Btn1S
Eng2FireAgt2Btn2D
ExtPwrBtn2O
- Gen1Btn1F
Gen1Btn2O
- Gen2Btn1F
Gen2Btn2O
RamAirBtn2O
+
+
+ ELAC1Btn1F
+ FAC1Btn1F
+ SECBtn1F
+ VentBlowBtn1F
+ Gen1Btn1F
+ Gen2Btn1F
+ ACPack1Btn1F
+ ACPack2Btn1F
@@ -98,7 +104,6 @@
CFuelTank2Btn1F
CFuelTank2Btn2O
CrewOxyBtn2O
- ELAC1Btn1F
ELAC1Btn2O
ELAC2Btn1F
ELAC2Btn2O
@@ -117,7 +122,6 @@
Eng2ManStartBtn2O
EvacCommandBtn1E
EvacCommandBtn2O
- FAC1Btn1F
FAC1Btn2O
FAC2Btn1F
FAC2Btn2O
@@ -165,13 +169,11 @@
RFuelTank1Btn2O
RFuelTank2Btn1F
RFuelTank2Btn2O
- SEC1Btn1F
SEC1Btn2O
SEC2Btn1F
SEC2Btn2O
SEC3Btn1F
SEC3Btn2O
- VentBlowBtn1F
VentBlowBtn2O
VentExtractBtn1F
VentExtractBtn2O
@@ -220,7 +222,6 @@
Gen1LineBtn1S
Gen1LineBtn2O
RcdrGndCtlBtn2O
- VentBlowBtn1F
VentBlowBtn2O
VentExtractBtn1F
VentExtractBtn2O
@@ -248,6 +249,23 @@
+
+
+ select
+ VentBlowBtn1F
+
+
+
+ /systems/ventilation/ventfan-fault
+ 1
+
+
+ controls/switches/annun-test
+ 1
+
+
+
+
select
diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas
index 1f273875..d08d3b16 100644
--- a/Nasal/electrical.nas
+++ b/Nasal/electrical.nas
@@ -30,6 +30,8 @@ setlistener("/sim/signals/fdm-initialized", func {
var battery2_sw = getprop("/controls/electrical/switches/battery2");
var battery1_volts = getprop("/systems/electrical/battery1-volts");
var battery2_volts = getprop("/systems/electrical/battery2-volts");
+ var bat1_cont = getprop("/systems/electrical/battery1-contact");
+ var bat2_cont = getprop("/systems/electrical/battery2-contact");
var rpmapu = getprop("/systems/apu/rpm");
var extpwr_on = getprop("/controls/switches/cart");
var stateL = getprop("/engines/engine[0]/state");
@@ -60,6 +62,7 @@ setlistener("/sim/signals/fdm-initialized", func {
var bat1_volts = getprop("/systems/electrical/battery1-volts");
var bat2_volts = getprop("/systems/electrical/battery2-volts");
var replay = getprop("/sim/replay/replay-state");
+ var wow = getprop("/gear/gear[1]/wow");
});
var elec_init = func {
@@ -80,6 +83,8 @@ var elec_init = func {
setprop("/systems/electrical/battery2-volts", 25.9);
setprop("/systems/electrical/battery1-amps", 0);
setprop("/systems/electrical/battery2-amps", 0);
+ setprop("/systems/electrical/battery1-contact", 0);
+ setprop("/systems/electrical/battery2-contact", 0);
setprop("/systems/electrical/bus/dc1", 0);
setprop("/systems/electrical/bus/dc2", 0);
setprop("/systems/electrical/bus/dcbat", 0);
@@ -112,6 +117,8 @@ var elec_init = func {
setprop("/systems/electrical/idg2-fault", 0);
setprop("/controls/electrical/xtie/xtieL", 0);
setprop("/controls/electrical/xtie/xtieR", 0);
+ setprop("/systems/electrical/bat1direction", 0); # - 1 = charge, 0 = disconnected, 1 = discharge
+ setprop("/systems/electrical/bat2direction", 0); # - 1 = charge, 0 = disconnected, 1 = discharge
# Below are standard FG Electrical stuff to keep things working when the plane is powered
setprop("/systems/electrical/outputs/adf", 0);
setprop("/systems/electrical/outputs/audio-panel", 0);
@@ -191,6 +198,9 @@ var master_elec = func {
gen1_fail = getprop("/systems/failures/elec-gen1");
gen2_fail = getprop("/systems/failures/elec-gen2");
replay = getprop("/sim/replay/replay-state");
+ bat1_cont = getprop("/systems/electrical/battery1-contact");
+ bat2_cont = getprop("/systems/electrical/battery2-contact");
+ wow = getprop("/gear/gear[1]/wow");
if (extpwr_on and gen_ext_sw) {
setprop("/systems/electrical/gen-ext", 1);
@@ -403,41 +413,65 @@ var master_elec = func {
setprop("/systems/electrical/battery2-amps", 0);
}
- if ((getprop("/systems/electrical/battery1-amps") > 120) or (getprop("/systems/electrical/battery2-amps") > 120)) {
+ dc1 = getprop("/systems/electrical/bus/dc1");
+ dc2 = getprop("/systems/electrical/bus/dc2");
+
+ if ((getprop("/systems/electrical/battery1-amps") > 120) or (getprop("/systems/electrical/battery2-amps") > 120) or dc1 > 25 or dc2 > 25) {
setprop("/systems/electrical/bus/dcbat", dc_volt_std);
} else {
setprop("/systems/electrical/bus/dcbat", 0);
}
- dc1 = getprop("/systems/electrical/bus/dc1");
- dc2 = getprop("/systems/electrical/bus/dc2");
+ if (battery1_volts < 26.5 or (rpmapu < 95 and getprop("/controls/APU/master") == 1) or (ac1 == 0 and ac2 == 0 and ias < 100)) {
+ setprop("/systems/electrical/battery1-contact", 1);
+ } else if (battery1_sw and wow and battery1_volts < 24.9 and !gen_apu_sw and !gen_ext_sw) {
+ setprop("/systems/electrical/battery1-contact", 0);
+ } else {
+ setprop("/systems/electrical/battery1-contact", 0);
+ }
- if (battery1_volts < 27.9 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
+ if (battery2_volts < 26.5 or (rpmapu < 95 and getprop("/controls/APU/master") == 1) or (ac1 == 0 and ac2 == 0 and ias < 100)) {
+ setprop("/systems/electrical/battery2-contact", 1);
+ } else if (battery2_sw and wow and battery2_volts < 24.9 and !gen_apu_sw and !gen_ext_sw) {
+ setprop("/systems/electrical/battery2-contact", 0);
+ } else {
+ setprop("/systems/electrical/battery2-contact", 0);
+ }
+
+ if (battery1_volts < 26.5 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
decharge1.stop();
charge1.start();
- } else if (battery1_volts == 27.9 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
+ setprop("/systems/electrical/bat1direction", -1);
+ } else if (battery1_volts < 27.9 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
charge1.stop();
decharge1.stop();
+ setprop("/systems/electrical/bat1direction", 2); # this is when it is connected, but is not charging or discharging
} else if (battery1_sw and !batt1_fail) {
charge1.stop();
decharge1.start();
+ setprop("/systems/electrical/bat1direction", 1);
} else {
decharge1.stop();
charge1.stop();
+ setprop("/systems/electrical/bat1direction", 0);
}
- if (battery2_volts < 27.9 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
+ if (battery2_volts < 26.5 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
decharge2.stop();
charge2.start();
+ setprop("/systems/electrical/bat1direction", 0);
} else if (battery2_volts == 27.9 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
charge2.stop();
decharge2.stop();
+ setprop("/systems/electrical/bat2direction", 2); # this is when it is connected, but is not charging or discharging
} else if (battery2_sw and !batt2_fail) {
charge2.stop();
decharge2.start();
+ setprop("/systems/electrical/bat2direction", 1);
} else {
decharge2.stop();
charge2.stop();
+ setprop("/systems/electrical/bat2direction", 0);
}
if (getprop("/systems/electrical/bus/ac-ess") < 110) {
@@ -542,7 +576,7 @@ var master_elec = func {
setprop("/systems/electrical/batt2-fault", 0);
}
- if ((gen1_fail and gen1_sw) or (gen1_sw and stateL != 3)) {
+ if (getprop("systems/electrical/battery2-amps") > 120 and (gen1_fail and gen1_sw) or (gen1_sw and stateL != 3)) {
setprop("/systems/electrical/gen1-fault", 1);
} else {
setprop("/systems/electrical/gen1-fault", 0);
@@ -560,13 +594,44 @@ var master_elec = func {
setprop("/systems/electrical/apugen-fault", 0);
}
- if ((gen2_fail and gen2_sw) or (gen2_sw and stateR != 3)) {
+ if (getprop("systems/electrical/battery2-amps") > 120 and (gen2_fail and gen2_sw) or (gen2_sw and stateR != 3)) {
setprop("/systems/electrical/gen2-fault", 1);
} else {
setprop("/systems/electrical/gen2-fault", 0);
}
+
+ if (getprop("/systems/failures/sec1-fail-time") + 5 >= getprop("/sim/time/elapsed-sec")) {
+ setprop("/systems/failures/sec1", 1);
+ } else {
+ setprop("/systems/failures/sec1", 0);
+ setprop("/systems/failures/sec1-fail-time", 0);
+ }
+
+ if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/dc1") >= 25 or getprop("/systems/failures/ventfan") == 1) {
+ setprop("/systems/ventilation/ventfan-fault", 0);
+ } else if (getprop("/systems/electrical/battery2-amps") > 120) {
+ setprop("/systems/ventilation/ventfan-fault", 1);
+ }
}
+setlistener("/controls/electrical/switches/battery2", func {
+ if (getprop("/controls/electrical/switches/battery2") == 1) {
+ setprop("/systems/failures/elac1", 1);
+ setprop("/systems/failures/sec1", 1);
+ setprop("/systems/failures/fac1", 1);
+
+ setprop("/systems/failures/sec1-fail-time", getprop("/sim/time/elapsed-sec"));
+ } else if (getprop("/systems/electrical/bus/dc-ess") >= 25 or getprop("/systems/electrical/bus/ac-ess") >= 25) {
+ setprop("/systems/failures/elac1", 0);
+ setprop("/systems/failures/sec1", 0);
+ setprop("/systems/failures/fac1", 0);
+ } else {
+ setprop("/systems/failures/elac1", 1);
+ setprop("/systems/failures/sec1", 1);
+ setprop("/systems/failures/fac1", 1);
+ }
+
+});
###################
# Update Function #
###################
diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas
index 8bf5971b..2e66f63d 100644
--- a/Nasal/libraries.nas
+++ b/Nasal/libraries.nas
@@ -27,6 +27,8 @@ var qty2 = math.round((rand() * 5 ) + 20, 0.1);
setprop("/engines/engine[0]/oil-qt-actual", qty1);
setprop("/engines/engine[1]/oil-qt-actual", qty2);
+# Failures
+setprop("/systems/failures/sec1-fail-time", 0);
##########
# Lights #
##########
diff --git a/Nasal/pneumatics.nas b/Nasal/pneumatics.nas
index 22f82c77..0fc14d44 100644
--- a/Nasal/pneumatics.nas
+++ b/Nasal/pneumatics.nas
@@ -369,13 +369,13 @@ var master_pneu = func {
setprop("/systems/pneumatic/bleedapu-fault", 0);
}
- if ((pack1_fail and pack1_sw) or (pack1_sw and pack1 <= 5)) {
+ if (getprop("systems/electrical/battery2-amps") > 120 and (pack1_fail and pack1_sw) or (pack1_sw and pack1 <= 5)) {
setprop("/systems/pneumatic/pack1-fault", 1);
} else {
setprop("/systems/pneumatic/pack1-fault", 0);
}
- if ((pack2_fail and pack2_sw) or (pack2_sw and pack2 <= 5)) {
+ if (getprop("systems/electrical/battery2-amps") > 120 and (pack2_fail and pack2_sw) or (pack2_sw and pack2 <= 5)) {
setprop("/systems/pneumatic/pack2-fault", 1);
} else {
setprop("/systems/pneumatic/pack2-fault", 0);
diff --git a/Systems/lower-ecam.xml b/Systems/lower-ecam.xml
index a6cb0100..1da513e4 100644
--- a/Systems/lower-ecam.xml
+++ b/Systems/lower-ecam.xml
@@ -199,5 +199,37 @@
+
+
+ Battery 1 Contact Rotation
+ gain
+ 1
+
+
+
+ /systems/electrical/battery1-contact
+ -1 0
+ 1180
+
+
+
+
+
+
+
+ Battery 2 Contact Rotation
+ gain
+ 1
+
+
+
+ /systems/electrical/battery2-contact
+ -1 0
+ 1180
+
+
+
+
+