Merge branch 'ECAM-sys-develop' of https://github.com/it0uchpods/IDG-A32X into ECAM-sys-develop

This commit is contained in:
Jonathan Redpath 2018-06-11 21:00:18 +01:00
commit 8cf8de7b33
3 changed files with 16 additions and 2 deletions

View file

@ -621,6 +621,8 @@ var ELEC = {
setprop("/systems/electrical/battery1-percent", battery1_percent_calc);
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
}
} else if (battery1_percent == 100 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
} else if (battery1_amps >= 120 and battery1_sw and !batt1_fail) {
if (getprop("/systems/electrical/battery1-time") + 5 < getprop("/sim/time/elapsed-sec")) {
battery1_percent_calc = battery1_percent - 0.25; # Roughly 90 percent every 30 mins
@ -643,6 +645,8 @@ var ELEC = {
setprop("/systems/electrical/battery2-percent", battery2_percent_calc);
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
}
} else if (battery2_percent == 100 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
} else if (battery2_amps >= 120 and battery2_sw and !batt2_fail) {
if (getprop("/systems/electrical/battery2-time") + 5 < getprop("/sim/time/elapsed-sec")) {
battery2_percent_calc = battery2_percent - 0.25; # Roughly 90 percent every 30 mins

View file

@ -9,6 +9,8 @@ print("-------------------------------------------------------------------------
print("Copyright (c) 2017-2018 Joshua Davidson (it0uchpods)");
print("-----------------------------------------------------------------------------");
setprop("/sim/replay/was-active", 0);
# Dimmers
setprop("/controls/lighting/ndl-norm", 1);
setprop("/controls/lighting/ndr-norm", 1);
@ -206,7 +208,7 @@ var systemsLoop = maketimer(0.1, func {
libraries.ECAM.loop();
ecam.ECAM_controller.loop();
fadec.fadecLoop();
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/switches/cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or getprop("/controls/gear/brake-parking") == 0)) {
setprop("/controls/switches/cart", 0);
setprop("/controls/pneumatic/switches/groundair", 0);
@ -246,6 +248,14 @@ var systemsLoop = maketimer(0.1, func {
if ((getprop("/engines/engine[1]/state") == 2 or getprop("/engines/engine[1]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[4]/contents-lbs") < 1) {
systems.cutoff_two();
}
if (getprop("/sim/replay/replay-state") == 1) {
setprop("/sim/replay/was-active", 1);
} else if (getprop("/sim/replay/replay-state") == 0 and getprop("/sim/replay/was-active") == 1) {
setprop("/sim/replay/was-active", 0);
acconfig.colddark();
gui.popupTip("Replay Ended: Setting Cold and Dark state...");
}
});
setlistener("/options/steep-ils", func {

View file

@ -1 +1 @@
4504
4506