Merge branch 'dev' of https://github.com/it0uchpods/IDG-A32X into dev
This commit is contained in:
commit
000fd3cffb
18 changed files with 435 additions and 222 deletions
|
@ -644,6 +644,7 @@
|
|||
<OH>
|
||||
<protectors>
|
||||
<ditching type="bool">0</ditching>
|
||||
<elecratman type="bool">0</elecratman>
|
||||
<eng1-manstart type="bool">0</eng1-manstart>
|
||||
<eng2-manstart type="bool">0</eng2-manstart>
|
||||
<eng1-n1 type="bool">0</eng1-n1>
|
||||
|
|
|
@ -229,9 +229,6 @@ var colddark_b = func {
|
|||
# Continues the Cold and Dark script, after engines fully shutdown.
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
setprop("/controls/gear/brake-left", 0);
|
||||
setprop("/controls/gear/brake-right", 0);
|
||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
||||
|
@ -265,9 +262,6 @@ var beforestart = func {
|
|||
failReset();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
|
@ -343,8 +337,6 @@ var taxi = func {
|
|||
failReset();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
|
|
|
@ -1287,10 +1287,12 @@ var canvas_lowerECAM_elec = {
|
|||
if (switch_emer_gen.getValue() == 0) {
|
||||
me["EMERGEN-group"].hide();
|
||||
me["ELEC-Line-Emergen-ESSTR"].hide();
|
||||
me["ELEC-Line-Emergen-ESSTR-off"].show();
|
||||
me["EMERGEN-Label-off"].show();
|
||||
} else {
|
||||
me["EMERGEN-group"].show();
|
||||
me["ELEC-Line-Emergen-ESSTR"].show();
|
||||
me["ELEC-Line-Emergen-ESSTR-off"].hide();
|
||||
me["EMERGEN-Label-off"].hide();
|
||||
}
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ var canvas_MCDU_base = {
|
|||
if (getprop("/FMGC/internal/adf1freq-set") == 1) {
|
||||
me["Simple_L5"].setFont(default);
|
||||
me["Simple_L5"].setFontSize(normal);
|
||||
me["Simple_L5"].setText(sprintf("%3.0f", adf1));
|
||||
me["Simple_L5"].setText(sprintf("%s", adf1));
|
||||
} else {
|
||||
me["Simple_L5"].setFont(symbol);
|
||||
me["Simple_L5"].setFontSize(small);
|
||||
|
@ -663,7 +663,7 @@ var canvas_MCDU_base = {
|
|||
if (getprop("/FMGC/internal/adf2freq-set") == 1) {
|
||||
me["Simple_R5"].setFont(default);
|
||||
me["Simple_R5"].setFontSize(normal);
|
||||
me["Simple_R5"].setText(sprintf("%3.0f", adf2));
|
||||
me["Simple_R5"].setText(sprintf("%s", adf2));
|
||||
} else {
|
||||
me["Simple_R5"].setFont(symbol);
|
||||
me["Simple_R5"].setFontSize(small);
|
||||
|
|
|
@ -3312,7 +3312,88 @@
|
|||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<animation>
|
||||
<name>ELEC RAT MAN pick</name>
|
||||
<type>pick</type>
|
||||
<object-name>EmerElecManOnBtn</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>controls/OH/protectors/elecratman</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/rat-man</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/OH/protectors/elecratman</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>EmerManOnGuard</object-name>
|
||||
<action>
|
||||
<button>1</button>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/OH/protectors/elecratman</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/OH/protectors/elecratman</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>EmerManOnGuard</object-name>
|
||||
<property>controls/OH/protectors/elecratman</property>
|
||||
<factor>-145</factor>
|
||||
<axis>
|
||||
<x1-m>-0.00273</x1-m>
|
||||
<y1-m>-0.20848</y1-m>
|
||||
<z1-m>-0.02796</z1-m>
|
||||
<x2-m>-0.00420</x2-m>
|
||||
<y2-m>-0.19657</y2-m>
|
||||
<z2-m>-0.02796</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<!-- Pneumatic -->
|
||||
<animation>
|
||||
<name>AC pack flow pick</name>
|
||||
|
|
|
@ -110,7 +110,7 @@ setlistener("/it-autoflight/input/ap1", func {
|
|||
fmabox();
|
||||
updateTimers();
|
||||
} else if (apmas == 1 and ac_ess >= 110 and law == 0) {
|
||||
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
|
||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/position/gear-agl-ft") >= 100) {
|
||||
if (getprop("/it-autoflight/output/lat") == 9) {
|
||||
setprop("/it-autoflight/input/lat", 3);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ setlistener("/it-autoflight/input/ap2", func {
|
|||
fmabox();
|
||||
updateTimers();
|
||||
} else if (apmas == 1 and ac_ess >= 110 and law == 0) {
|
||||
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
|
||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/position/gear-agl-ft") >= 100) {
|
||||
if (getprop("/it-autoflight/output/lat") == 9) {
|
||||
setprop("/it-autoflight/input/lat", 3);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
|
|||
setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99");
|
||||
setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
|
||||
setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
|
||||
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
|
||||
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
|
||||
setprop("/gear/gear[0]/wow-fmgc", 1);
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
|
|
|
@ -34,6 +34,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
var ac_ess_feed_sw = getprop("/controls/electrical/switches/ac-ess-feed");
|
||||
var battery1_sw = getprop("/controls/electrical/switches/battery1");
|
||||
var battery2_sw = getprop("/controls/electrical/switches/battery2");
|
||||
var manrat = getprop("/controls/electrical/switches/rat-man");
|
||||
var battery1_volts = getprop("/systems/electrical/battery1-volts");
|
||||
var battery2_volts = getprop("/systems/electrical/battery2-volts");
|
||||
var battery1_amps = getprop("/systems/electrical/battery1-amps");
|
||||
|
@ -62,8 +63,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
var galley_shed = getprop("/systems/electrical/extra/galleyshed");
|
||||
var emergen = getprop("/controls/electrical/switches/emer-gen");
|
||||
var ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||
var rat = getprop("/controls/hydraulic/rat");
|
||||
var manrat = getprop("/controls/hydraulic/rat-man");
|
||||
var rat = getprop("/controls/electrical/rat");
|
||||
var ac_ess_fail = getprop("/systems/failures/elec-ac-ess");
|
||||
var batt1_fail = getprop("/systems/failures/elec-batt1");
|
||||
var batt2_fail = getprop("/systems/failures/elec-batt2");
|
||||
|
@ -158,6 +158,7 @@ var ELEC = {
|
|||
setprop("/controls/electrical/switches/ac-ess-feed", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
setprop("/controls/electrical/switches/rat-man", 0);
|
||||
setprop("/systems/electrical/battery1-volts", 26.5);
|
||||
setprop("/systems/electrical/battery2-volts", 26.5);
|
||||
setprop("/systems/electrical/battery1-amps", 0);
|
||||
|
@ -206,6 +207,7 @@ var ELEC = {
|
|||
setprop("/systems/electrical/idg2-fault", 0);
|
||||
setprop("/controls/electrical/xtie/xtieL", 0);
|
||||
setprop("/controls/electrical/xtie/xtieR", 0);
|
||||
setprop("/controls/electrical/rat", 0);
|
||||
setprop("/systems/electrical/battery-available", 0);
|
||||
setprop("/systems/electrical/dc2-available", 0);
|
||||
# Below are standard FG Electrical stuff to keep things working when the plane is powered
|
||||
|
@ -280,6 +282,7 @@ var ELEC = {
|
|||
ac_ess_feed_sw = getprop("/controls/electrical/switches/ac-ess-feed");
|
||||
battery1_sw = getprop("/controls/electrical/switches/battery1");
|
||||
battery2_sw = getprop("/controls/electrical/switches/battery2");
|
||||
manrat = getprop("/controls/electrical/switches/rat-man");
|
||||
battery1_volts = getprop("/systems/electrical/battery1-volts");
|
||||
battery2_volts = getprop("/systems/electrical/battery2-volts");
|
||||
battery1_percent = getprop("/systems/electrical/battery1-percent");
|
||||
|
@ -302,8 +305,7 @@ var ELEC = {
|
|||
galley_shed = getprop("/systems/electrical/extra/galleyshed");
|
||||
emergen = getprop("/controls/electrical/switches/emer-gen");
|
||||
ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||
rat = getprop("/controls/hydraulic/rat");
|
||||
manrat = getprop("/controls/hydraulic/rat-man");
|
||||
rat = getprop("/controls/electrical/rat");
|
||||
ac_ess_fail = getprop("/systems/failures/elec-ac-ess");
|
||||
batt1_fail = getprop("/systems/failures/elec-batt1");
|
||||
batt2_fail = getprop("/systems/failures/elec-batt2");
|
||||
|
@ -594,13 +596,17 @@ var ELEC = {
|
|||
setprop("/systems/electrical/extra/galleyshed", 0);
|
||||
}
|
||||
|
||||
if (((ac1 == 0 and ac2 == 0 and ias >= 100) or manrat) and replay == 0) {
|
||||
if (ac1 < 110 and ac2 < 110 and ias >= 100 and replay == 0) {
|
||||
setprop("/controls/hydraulic/rat-deployed", 1);
|
||||
setprop("/controls/hydraulic/rat", 1);
|
||||
setprop("/controls/electrical/rat", 1);
|
||||
setprop("/controls/electrical/switches/emer-gen", 1);
|
||||
} else if (manrat) {
|
||||
setprop("/controls/hydraulic/rat-deployed", 1);
|
||||
setprop("/controls/electrical/rat", 1);
|
||||
setprop("/controls/electrical/switches/emer-gen", 1);
|
||||
}
|
||||
|
||||
if (ias < 100 or (ac1 == 1) or (ac2 == 1)) {
|
||||
if (ias < 100 or ac1 >= 110 or ac2 >= 110) {
|
||||
setprop("/controls/electrical/switches/emer-gen", 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ setprop("/controls/engines/engine[1]/last-igniter", "B");
|
|||
var eng_init = func {
|
||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
||||
eng_common_init();
|
||||
}
|
||||
|
||||
# Trigger Startups and Stops
|
||||
|
|
|
@ -17,10 +17,19 @@ var apu_egt_min = 352;
|
|||
var apu_egt_max = 704;
|
||||
setprop("/systems/apu/rpm", 0);
|
||||
setprop("/systems/apu/egt", 42);
|
||||
setprop("/systems/apu/bleed-used", 0);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
setprop("/systems/apu/bleed-time", 0);
|
||||
|
||||
var eng_common_init = func {
|
||||
setprop("/systems/apu/bleed-used", 0);
|
||||
}
|
||||
|
||||
# Start APU
|
||||
setlistener("/controls/APU/start", func {
|
||||
if ((getprop("/controls/APU/master") == 1) and (getprop("/controls/APU/start") == 1)) {
|
||||
if (getprop("/controls/APU/master") == 1 and getprop("/controls/APU/start") == 1) {
|
||||
apuBleedChk.stop();
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
if (getprop("/systems/acconfig/autoconfig-running") == 0) {
|
||||
interpolate("/systems/apu/rpm", apu_max, spinup_time);
|
||||
apu_egt_check.start();
|
||||
|
@ -56,14 +65,38 @@ setlistener("/controls/APU/master", func {
|
|||
apu_egt_check.stop();
|
||||
apu_egt2_check.stop();
|
||||
apu_stop();
|
||||
} else if (getprop("/controls/APU/master") == 1) {
|
||||
apuBleedChk.stop();
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
}
|
||||
});
|
||||
|
||||
var apu_stop = func {
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 1) {
|
||||
setprop("/systems/apu/bleed-counting", 1);
|
||||
setprop("/systems/apu/bleed-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
|
||||
apuBleedChk.start();
|
||||
} else {
|
||||
apuBleedChk.stop();
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
}
|
||||
}
|
||||
|
||||
var apuBleedChk = maketimer(0.1, func {
|
||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
|
||||
if (getprop("/systems/apu/bleed-time") + 60 <= getprop("/sim/time/elapsed-sec")) {
|
||||
apuBleedChk.stop();
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
# Various Other Stuff
|
||||
var doIdleThrust = func {
|
||||
setprop("/controls/engines/engine[0]/throttle", 0.0);
|
||||
|
|
|
@ -31,6 +31,7 @@ setprop("/controls/engines/engine[1]/last-igniter", "B");
|
|||
var eng_init = func {
|
||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
||||
eng_common_init();
|
||||
}
|
||||
|
||||
# Trigger Startups and Stops
|
||||
|
|
|
@ -17,78 +17,126 @@ setprop("/systems/fadec/eng2/ff", 1);
|
|||
setprop("/systems/fadec/power-avail", 0);
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
setprop("/systems/fadec/powered-time", 0);
|
||||
setprop("/systems/fadec/powered-time", -300);
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
setprop("/systems/fadec/eng1-master-count", 0);
|
||||
setprop("/systems/fadec/eng1-master-time", -300);
|
||||
setprop("/systems/fadec/eng1-off-power", 0);
|
||||
setprop("/systems/fadec/eng2-master-count", 0);
|
||||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
setprop("/systems/fadec/eng2-off-power", 0);
|
||||
|
||||
var fadecLoop = func {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
||||
|
||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
||||
setprop("/systems/fadec/powered-time", getprop("/sim/time/elapsed-sec"));
|
||||
setprop("/systems/fadec/power-avail", 1);
|
||||
var FADEC = {
|
||||
init: func() {
|
||||
setprop("/systems/fadec/powered-time", 0);
|
||||
setprop("/systems/fadec/eng1-master-time", -300);
|
||||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
},
|
||||
loop: func() {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
||||
var elapsedSec = getprop("/sim/time/elapsed-sec");
|
||||
|
||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
||||
setprop("/systems/fadec/powered-time", elapsedSec);
|
||||
setprop("/systems/fadec/power-avail", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
||||
setprop("/systems/fadec/power-avail", 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
||||
setprop("/systems/fadec/power-avail", 0);
|
||||
|
||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
||||
|
||||
if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/powerup", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
}
|
||||
}
|
||||
|
||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
||||
|
||||
if (getprop("/systems/fadec/powered-time") + 300 >= getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/fadec/powerup", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
}
|
||||
|
||||
if (state1 == 3) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
}
|
||||
|
||||
if (state2 == 3) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
}
|
||||
|
||||
var powered1 = getprop("/systems/fadec/powered1");
|
||||
var powered2 = getprop("/systems/fadec/powered2");
|
||||
|
||||
if (powered1 or getprop("/systems/fadec/powerup")) {
|
||||
setprop("/systems/fadec/eng1/n1", 1);
|
||||
setprop("/systems/fadec/eng1/egt", 1);
|
||||
setprop("/systems/fadec/eng1/n2", 1);
|
||||
setprop("/systems/fadec/eng1/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n1", 0);
|
||||
setprop("/systems/fadec/eng1/egt", 0);
|
||||
setprop("/systems/fadec/eng1/n2", 0);
|
||||
setprop("/systems/fadec/eng1/ff", 0);
|
||||
}
|
||||
|
||||
if (powered2 or getprop("/systems/fadec/powerup")) {
|
||||
setprop("/systems/fadec/eng2/n1", 1);
|
||||
setprop("/systems/fadec/eng2/egt", 1);
|
||||
setprop("/systems/fadec/eng2/n2", 1);
|
||||
setprop("/systems/fadec/eng2/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n1", 0);
|
||||
setprop("/systems/fadec/eng2/egt", 0);
|
||||
setprop("/systems/fadec/eng2/n2", 0);
|
||||
setprop("/systems/fadec/eng2/ff", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (master1 == 1) {
|
||||
if (getprop("/systems/fadec/eng1-master-count") != 1) {
|
||||
setprop("/systems/fadec/eng1-master-time", elapsedSec);
|
||||
setprop("/systems/fadec/eng1-master-count", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/eng1-master-count") != 0) {
|
||||
setprop("/systems/fadec/eng1-master-count", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/eng1-off-power", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1-off-power", 0);
|
||||
}
|
||||
|
||||
if (master2 == 1) {
|
||||
if (getprop("/systems/fadec/eng2-master-count") != 1) {
|
||||
setprop("/systems/fadec/eng2-master-time", elapsedSec);
|
||||
setprop("/systems/fadec/eng2-master-count", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/eng2-master-count") != 0) {
|
||||
setprop("/systems/fadec/eng2-master-count", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/eng2-off-power", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2-off-power", 0);
|
||||
}
|
||||
|
||||
if (state1 == 3) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
}
|
||||
|
||||
if (state2 == 3) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
}
|
||||
|
||||
var powered1 = getprop("/systems/fadec/powered1");
|
||||
var powered2 = getprop("/systems/fadec/powered2");
|
||||
|
||||
if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
|
||||
setprop("/systems/fadec/eng1/n1", 1);
|
||||
setprop("/systems/fadec/eng1/egt", 1);
|
||||
setprop("/systems/fadec/eng1/n2", 1);
|
||||
setprop("/systems/fadec/eng1/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n1", 0);
|
||||
setprop("/systems/fadec/eng1/egt", 0);
|
||||
setprop("/systems/fadec/eng1/n2", 0);
|
||||
setprop("/systems/fadec/eng1/ff", 0);
|
||||
}
|
||||
|
||||
if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
|
||||
setprop("/systems/fadec/eng2/n1", 1);
|
||||
setprop("/systems/fadec/eng2/egt", 1);
|
||||
setprop("/systems/fadec/eng2/n2", 1);
|
||||
setprop("/systems/fadec/eng2/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n1", 0);
|
||||
setprop("/systems/fadec/eng2/egt", 0);
|
||||
setprop("/systems/fadec/eng2/n2", 0);
|
||||
setprop("/systems/fadec/eng2/ff", 0);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -21,126 +21,174 @@ setprop("/systems/fadec/eng2/ff", 1);
|
|||
setprop("/systems/fadec/power-avail", 0);
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
setprop("/systems/fadec/powered-time", 0);
|
||||
setprop("/systems/fadec/powered-time", -300);
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
setprop("/systems/fadec/eng1-master-count", 0);
|
||||
setprop("/systems/fadec/eng1-master-time", -300);
|
||||
setprop("/systems/fadec/eng1-off-power", 0);
|
||||
setprop("/systems/fadec/eng2-master-count", 0);
|
||||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
setprop("/systems/fadec/eng2-off-power", 0);
|
||||
|
||||
var fadecLoop = func {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
||||
var N1Mode1_sw = getprop("/controls/fadec/n1mode1");
|
||||
var N1Mode2_sw = getprop("/controls/fadec/n1mode2");
|
||||
|
||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
||||
setprop("/systems/fadec/powered-time", getprop("/sim/time/elapsed-sec"));
|
||||
setprop("/systems/fadec/power-avail", 1);
|
||||
var FADEC = {
|
||||
init: func() {
|
||||
setprop("/systems/fadec/powered-time", 0);
|
||||
setprop("/systems/fadec/eng1-master-time", -300);
|
||||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
},
|
||||
loop: func() {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
||||
var N1Mode1_sw = getprop("/controls/fadec/n1mode1");
|
||||
var N1Mode2_sw = getprop("/controls/fadec/n1mode2");
|
||||
var elapsedSec = getprop("/sim/time/elapsed-sec");
|
||||
|
||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
||||
setprop("/systems/fadec/powered-time", elapsedSec);
|
||||
setprop("/systems/fadec/power-avail", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
||||
setprop("/systems/fadec/power-avail", 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
||||
setprop("/systems/fadec/power-avail", 0);
|
||||
|
||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
||||
|
||||
if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/powerup", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
}
|
||||
}
|
||||
|
||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
||||
|
||||
if (getprop("/systems/fadec/powered-time") + 300 >= getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/fadec/powerup", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powerup", 0);
|
||||
}
|
||||
|
||||
if (state1 == 3) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
}
|
||||
|
||||
if (state2 == 3) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
}
|
||||
|
||||
if (N1Mode1_sw == 1) {
|
||||
setprop("/systems/fadec/n1mode1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/n1mode1", 0);
|
||||
}
|
||||
|
||||
if (N1Mode2_sw == 1) {
|
||||
setprop("/systems/fadec/n1mode2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/n1mode2", 0);
|
||||
}
|
||||
|
||||
var powered1 = getprop("/systems/fadec/powered1");
|
||||
var powered2 = getprop("/systems/fadec/powered2");
|
||||
var N1Mode1 = getprop("/systems/fadec/n1mode1");
|
||||
var N1Mode2 = getprop("/systems/fadec/n1mode2");
|
||||
var N11 = getprop("/engines/engine[0]/n1-actual");
|
||||
var N12 = getprop("/engines/engine[1]/n1-actual");
|
||||
var N21 = getprop("/engines/engine[0]/n2-actual");
|
||||
var N22 = getprop("/engines/engine[1]/n2-actual");
|
||||
|
||||
if ((powered1 or getprop("/systems/fadec/powerup")) and N1Mode1 == 0) {
|
||||
setprop("/systems/fadec/eng1/epr", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/epr", 0);
|
||||
}
|
||||
|
||||
if ((powered2 or getprop("/systems/fadec/powerup")) and N1Mode2 == 0) {
|
||||
setprop("/systems/fadec/eng2/epr", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/epr", 0);
|
||||
}
|
||||
|
||||
if (powered1 or getprop("/systems/fadec/powerup")) {
|
||||
setprop("/systems/fadec/eng1/egt", 1);
|
||||
setprop("/systems/fadec/eng1/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/egt", 0);
|
||||
setprop("/systems/fadec/eng1/ff", 0);
|
||||
}
|
||||
|
||||
if (powered2 or getprop("/systems/fadec/powerup")) {
|
||||
setprop("/systems/fadec/eng2/egt", 1);
|
||||
setprop("/systems/fadec/eng2/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/egt", 0);
|
||||
setprop("/systems/fadec/eng2/ff", 0);
|
||||
}
|
||||
|
||||
if (powered1 and N11 >= 3.5) {
|
||||
setprop("/systems/fadec/eng1/n1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n1", 0);
|
||||
}
|
||||
|
||||
if (powered2 and N12 >= 3.5) {
|
||||
setprop("/systems/fadec/eng2/n1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n1", 0);
|
||||
}
|
||||
|
||||
if (powered1 and N21 >= 3.5) {
|
||||
setprop("/systems/fadec/eng1/n2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n2", 0);
|
||||
}
|
||||
|
||||
if (powered2 and N22 >= 3.5) {
|
||||
setprop("/systems/fadec/eng2/n2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n2", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (master1 == 1) {
|
||||
if (getprop("/systems/fadec/eng1-master-count") != 1) {
|
||||
setprop("/systems/fadec/eng1-master-time", elapsedSec);
|
||||
setprop("/systems/fadec/eng1-master-count", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/eng1-master-count") != 0) {
|
||||
setprop("/systems/fadec/eng1-master-count", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/eng1-off-power", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1-off-power", 0);
|
||||
}
|
||||
|
||||
if (master2 == 1) {
|
||||
if (getprop("/systems/fadec/eng2-master-count") != 1) {
|
||||
setprop("/systems/fadec/eng2-master-time", elapsedSec);
|
||||
setprop("/systems/fadec/eng2-master-count", 1);
|
||||
}
|
||||
} else {
|
||||
if (getprop("/systems/fadec/eng2-master-count") != 0) {
|
||||
setprop("/systems/fadec/eng2-master-count", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
||||
setprop("/systems/fadec/eng2-off-power", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2-off-power", 0);
|
||||
}
|
||||
|
||||
if (state1 == 3) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered1", 0);
|
||||
}
|
||||
|
||||
if (state2 == 3) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else if (powerAvail and modeSel == 2) {
|
||||
setprop("/systems/fadec/powered2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/powered2", 0);
|
||||
}
|
||||
|
||||
if (N1Mode1_sw == 1) {
|
||||
setprop("/systems/fadec/n1mode1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/n1mode1", 0);
|
||||
}
|
||||
|
||||
if (N1Mode2_sw == 1) {
|
||||
setprop("/systems/fadec/n1mode2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/n1mode2", 0);
|
||||
}
|
||||
|
||||
var powered1 = getprop("/systems/fadec/powered1");
|
||||
var powered2 = getprop("/systems/fadec/powered2");
|
||||
var N1Mode1 = getprop("/systems/fadec/n1mode1");
|
||||
var N1Mode2 = getprop("/systems/fadec/n1mode2");
|
||||
var N11 = getprop("/engines/engine[0]/n1-actual");
|
||||
var N12 = getprop("/engines/engine[1]/n1-actual");
|
||||
var N21 = getprop("/engines/engine[0]/n2-actual");
|
||||
var N22 = getprop("/engines/engine[1]/n2-actual");
|
||||
|
||||
if ((powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) and N1Mode1 == 0) {
|
||||
setprop("/systems/fadec/eng1/epr", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/epr", 0);
|
||||
}
|
||||
|
||||
if ((powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) and N1Mode2 == 0) {
|
||||
setprop("/systems/fadec/eng2/epr", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/epr", 0);
|
||||
}
|
||||
|
||||
if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
|
||||
setprop("/systems/fadec/eng1/egt", 1);
|
||||
setprop("/systems/fadec/eng1/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/egt", 0);
|
||||
setprop("/systems/fadec/eng1/ff", 0);
|
||||
}
|
||||
|
||||
if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
|
||||
setprop("/systems/fadec/eng2/egt", 1);
|
||||
setprop("/systems/fadec/eng2/ff", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/egt", 0);
|
||||
setprop("/systems/fadec/eng2/ff", 0);
|
||||
}
|
||||
|
||||
if (powered1 and N11 >= 3.5) {
|
||||
setprop("/systems/fadec/eng1/n1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n1", 0);
|
||||
}
|
||||
|
||||
if (powered2 and N12 >= 3.5) {
|
||||
setprop("/systems/fadec/eng2/n1", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n1", 0);
|
||||
}
|
||||
|
||||
if (powered1 and N21 >= 3.5) {
|
||||
setprop("/systems/fadec/eng1/n2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng1/n2", 0);
|
||||
}
|
||||
|
||||
if (powered2 and N22 >= 3.5) {
|
||||
setprop("/systems/fadec/eng2/n2", 1);
|
||||
} else {
|
||||
setprop("/systems/fadec/eng2/n2", 0);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -125,7 +125,7 @@ var HYD = {
|
|||
setprop("/systems/hydraulic/ptu-active", 0);
|
||||
}
|
||||
|
||||
if ((rat_man_sw == 1 or getprop("/controls/electrical/switches/emer-gen") == 1) and gs > 100) {
|
||||
if ((rat_man_sw == 1 or getprop("/controls/electrical/switches/emer-gen") == 1) and gs >= 100) {
|
||||
setprop("/controls/hydraulic/rat", 1);
|
||||
setprop("/controls/hydraulic/rat-deployed", 1);
|
||||
} else if (gs < 100) {
|
||||
|
|
|
@ -16,9 +16,6 @@ setprop("/controls/lighting/ndl-norm", 1);
|
|||
setprop("/controls/lighting/ndr-norm", 1);
|
||||
setprop("/controls/lighting/upper-norm", 1);
|
||||
|
||||
# Surprise
|
||||
setprop("/controls/tray/surprise", 1);
|
||||
|
||||
# Lights
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
setprop("/sim/model/lights/turnoffsw", 0);
|
||||
|
@ -180,6 +177,7 @@ var systemsInit = func {
|
|||
systems.eng_init();
|
||||
systems.fire_init();
|
||||
systems.autobrake_init();
|
||||
fadec.FADEC.init();
|
||||
fmgc.APinit();
|
||||
fmgc.FMGCinit();
|
||||
mcdu.MCDU_init(0);
|
||||
|
@ -208,7 +206,7 @@ var systemsLoop = maketimer(0.1, func {
|
|||
systems.ADIRS.loop();
|
||||
libraries.ECAM.loop();
|
||||
libraries.BUTTONS.update();
|
||||
fadec.fadecLoop();
|
||||
fadec.FADEC.loop();
|
||||
ecam.ECAM_controller.loop();
|
||||
|
||||
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/switches/cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or getprop("/controls/gear/brake-parking") == 0)) {
|
||||
|
|
|
@ -200,6 +200,7 @@ var PNEU = {
|
|||
# Air Sources/PSI
|
||||
if (rpmapu >= 94.9 and bleedapu_sw and !bleedapu_fail) {
|
||||
setprop("/systems/pneumatic/bleedapu", 34);
|
||||
setprop("/systems/apu/bleed-used", 1);
|
||||
} else {
|
||||
setprop("/systems/pneumatic/bleedapu", 0);
|
||||
}
|
||||
|
@ -372,10 +373,10 @@ var PNEU = {
|
|||
acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
fanon = getprop("/systems/ventilation/avionics/fan");
|
||||
|
||||
if ((dcess > 25) or (acess > 110)) {
|
||||
if (dcess > 25 or acess > 110) {
|
||||
setprop("/systems/ventilation/avionics/fan", 1);
|
||||
setprop("/systems/ventilation/lavatory/extractfan", 1);
|
||||
} else if ((dcess == 0) and (acess == 0)) {
|
||||
} else if (dcess == 0 and acess == 0) {
|
||||
setprop("/systems/ventilation/avionics/fan", 0);
|
||||
setprop("/systems/ventilation/lavatory/extractfan", 0);
|
||||
}
|
||||
|
|
|
@ -666,7 +666,6 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="hydraulics/spoiler-r4/extended">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
spoilers/main-gear-and eq 0
|
||||
/systems/failures/spoiler-r4 eq 0
|
||||
spoilers/main-cmd gt 0
|
||||
</test>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4655
|
||||
4661
|
Reference in a new issue