major updates

This commit is contained in:
Jonathan Redpath 2017-06-10 20:51:50 +01:00
parent 43b8ea1a7b
commit f5f709bba7
5 changed files with 32 additions and 15 deletions

View file

@ -98,7 +98,6 @@ var systemsReset = func {
systems.ADIRSreset();
systems.pneu_init();
systems.hyd_init();
systems.press_init();
systems.fuel_init();
fmgc.FMGCinit();
mcdu1.MCDU_reset();

View file

@ -3185,7 +3185,7 @@
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pressurization/auto</property>
<property>/systems/pressurization/auto</property>
</binding>
<binding>
<command>nasal</command>
@ -3217,7 +3217,7 @@
<condition>
<or>
<equals>
<property>/controls/pressurization/auto</property>
<property>/systems/pressurization/auto</property>
<value>0</value>
</equals>
<equals>
@ -3230,7 +3230,7 @@
<animation>
<type>pick</type>
<object-name>DitchBtn</object-name>
<object-name>DitchBtn1</object-name>
<object-name>DitchBtn2O</object-name>
<action>
<button>0</button>

View file

@ -18,6 +18,8 @@ var hyd_init = func {
setprop("/systems/hydraulic/blue-psi", 0);
setprop("/systems/hydraulic/green-psi", 0);
setprop("/systems/hydraulic/yellow-psi", 0);
setprop("/systems/hydraulic/spoiler3and4-inhibit", 0);
setprop("/systems/hydraulic/spoiler-inhibit", 0);
setprop("/controls/gear/brake-parking", 0);
hyd_timer.start();
}
@ -133,6 +135,26 @@ var master_hyd = func {
setprop("/systems/hydraulic/yellow-psi", 0);
}
}
var lelev = getprop("/systems/failures/elevator-left");
var relev = getprop("/systems/failures/elevator-right");
var flap = getprop("/controls/flight/flap-txt");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var alpha = getprop("/systems/thrust/alpha-floor");
var sec1 = getprop("/systems/failures/sec1");
var sec3 = getprop("/systems/failures/sec3");
#var aoa_prot = getprop("aoaprotection);
if (lelev or relev) {
setprop("/systems/hydraulic/spoiler3and4-inhibit", 1);
} else {
setprop("/systems/hydraulic/spoiler3and4-inhibit", 0);
}
if ((flap == "FULL") or alpha or (sec1 and sec3) or (((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA")))) {
setprop("/systems/hydraulic/spoiler-inhibit", 1);
} else {
setprop("/systems/hydraulic/spoiler-inhibit", 0);
}
}
#######################

View file

@ -44,7 +44,7 @@ var pneu_init = func {
setprop("/systems/pressurization/targetalt", altitude);
setprop("/systems/pressurization/diff-to-target", "0");
setprop("/systems/pressurization/ditchingpb", 0);
setprop("/systems/pressurization/targetvs", 0);
setprop("/systems/pressurization/targetvs", "0");
pneu_timer.start();
}
@ -188,16 +188,6 @@ var master_pneu = func {
if (ditch and auto) {
setprop("/systems/pressurization/outflowpos", "1");
}
if ((targetvs => 0) and (targetvs < 1000) and !ditch) {
setprop("/systems/pressurization/outflowpos", "0.75");
} else if ((targetvs => 1000) and (targetvs < 1999) and !ditch) {
setprop("/systems/pressurization/outflowpos", "0.55");
} else if ((targetvs => 2000) and !ditch) {
setprop("/systems/pressurization/outflowpos", "0.25");
} else if ((targetvs < 0) and !ditch) {
setprop("/systems/pressurization/outflowpos", "1");
}
}

View file

@ -231,10 +231,16 @@
<update-interval-secs type="double">0.1</update-interval-secs>
<input>
<condition>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<less-than>
<property>/systems/pressurization/targetalt-cmd</property>
<property>/systems/pressurization/cabinalt-norm</property>
</less-than>
</or>
</condition>
<property>/systems/pressurization/cabinalt-norm</property>
</input>