Merge branch 'master' into Lower-ECAM

This commit is contained in:
Joshua Davidson 2018-07-22 13:55:58 -04:00
commit 9998afa203
5 changed files with 86 additions and 92 deletions

View file

@ -540,7 +540,6 @@
<elevator-input>0</elevator-input> <elevator-input>0</elevator-input>
<elevator-trim-fdm>0.0</elevator-trim-fdm> <elevator-trim-fdm>0.0</elevator-trim-fdm>
<flap-pos type="int">0</flap-pos> <flap-pos type="int">0</flap-pos>
<ground-spoilers-armed type="bool">0</ground-spoilers-armed>
<rudder-trim-fdm>0.0</rudder-trim-fdm> <rudder-trim-fdm>0.0</rudder-trim-fdm>
<speedbrake-arm>0</speedbrake-arm> <speedbrake-arm>0</speedbrake-arm>
<slats>0</slats> <slats>0</slats>
@ -1370,7 +1369,7 @@
</and> </and>
</condition> </condition>
<command>property-cycle</command> <command>property-cycle</command>
<property>controls/flight/speedbrake</property> <property>/controls/flight/speedbrake</property>
<value>0.0</value> <value>0.0</value>
<value>1.0</value> <value>1.0</value>
</binding> </binding>
@ -1392,14 +1391,14 @@
</and> </and>
</condition> </condition>
<command>property-cycle</command> <command>property-cycle</command>
<property>controls/flight/speedbrake</property> <property>/controls/flight/speedbrake</property>
<value>0.0</value> <value>0.0</value>
<value>0.5</value> <value>0.5</value>
<value>1.0</value> <value>1.0</value>
</binding> </binding>
<binding> <binding>
<command>property-assign</command> <command>property-assign</command>
<property>controls/flight/speedbrake-arm</property> <property>/controls/flight/speedbrake-arm</property>
<value>0</value> <value>0</value>
</binding> </binding>
</key> </key>

View file

@ -4935,9 +4935,8 @@
<animation> <animation>
<type>rotate</type> <type>rotate</type>
<object-name>SpdBrk</object-name> <object-name>SpdBrk</object-name>
<property>controls/flight/speedbrake</property> <property>fdm/jsbsim/spoilers/speedbrake-nul</property>
<factor>45</factor> <factor>45</factor>
<!--offset-deg>10</offset-deg-->
<axis> <axis>
<object-name>SpdBrk.axis</object-name> <object-name>SpdBrk.axis</object-name>
</axis> </axis>

View file

@ -399,6 +399,43 @@ var flaptimer = maketimer(0.5, func {
} }
}); });
controls.stepSpoilers = func(step) {
setprop("/controls/flight/speedbrake-arm", 0);
if (step == 1) {
deploySpeedbrake();
} else if (step == -1) {
retractSpeedbrake();
}
}
var deploySpeedbrake = func {
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
if (getprop("/controls/flight/speedbrake") < 1.0) {
setprop("/controls/flight/speedbrake", 1.0);
}
} else {
if (getprop("/controls/flight/speedbrake") < 0.5) {
setprop("/controls/flight/speedbrake", 0.5);
} else if (getprop("/controls/flight/speedbrake") < 1.0) {
setprop("/controls/flight/speedbrake", 1.0);
}
}
}
var retractSpeedbrake = func {
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
if (getprop("/controls/flight/speedbrake") > 0.0) {
setprop("/controls/flight/speedbrake", 0.0);
}
} else {
if (getprop("/controls/flight/speedbrake") > 0.5) {
setprop("/controls/flight/speedbrake", 0.5);
} else if (getprop("/controls/flight/speedbrake") > 0.0) {
setprop("/controls/flight/speedbrake", 0.0);
}
}
}
var slewProp = func(prop, delta) { var slewProp = func(prop, delta) {
delta *= getprop("/sim/time/delta-realtime-sec"); delta *= getprop("/sim/time/delta-realtime-sec");
setprop(prop, getprop(prop) + delta); setprop(prop, getprop(prop) + delta);

View file

@ -50,7 +50,14 @@
spoilers/throttle[1] ge 0.01 spoilers/throttle[1] ge 0.01
/controls/flight/speedbrake-arm ne 1 /controls/flight/speedbrake-arm ne 1
</test> </test>
<test logic="AND" value="1"> <!-- Set --> <test logic="AND" value="1"> <!-- EXT Set -->
spoilers/throttle[0] lt 0.01
spoilers/throttle[1] lt 0.01
/controls/flight/speedbrake-arm eq 1
spoilers/main-gear-and eq 1
/velocities/groundspeed-kt ge 72
</test>
<test logic="AND" value="0.25"> <!-- PLD Set -->
spoilers/throttle[0] lt 0.01 spoilers/throttle[0] lt 0.01
spoilers/throttle[1] lt 0.01 spoilers/throttle[1] lt 0.01
/controls/flight/speedbrake-arm eq 1 /controls/flight/speedbrake-arm eq 1
@ -96,15 +103,7 @@
<channel name="Spoiler L1"> <channel name="Spoiler L1">
<switch name="hydraulics/spoiler-l1/switch"> <switch name="hydraulics/spoiler-l1/switch">
<default value="hydraulics/spoiler-l1/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 0
</test>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoiler-l1 eq 1
</test>
<test logic="AND" value="spoilers/main-cmd"> <test logic="AND" value="spoilers/main-cmd">
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1 spoilers/main-gear-and eq 1
@ -194,11 +193,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-l2/switch"> <switch name="hydraulics/spoiler-l2/switch">
<default value="hydraulics/spoiler-l2/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoiler-l2 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-l2/air-extended"> <test logic="AND" value="hydraulics/spoiler-l2/air-extended">
/systems/hydraulic/yellow-psi ge 1500 /systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0 spoilers/main-gear-and eq 0
@ -269,11 +264,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-l3/switch"> <switch name="hydraulics/spoiler-l3/switch">
<default value="hydraulics/spoiler-l3/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/blue-psi ge 1500
/systems/failures/spoiler-l3 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-l3/extended"> <test logic="AND" value="hydraulics/spoiler-l3/extended">
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
/systems/failures/spoiler-l3 eq 0 /systems/failures/spoiler-l3 eq 0
@ -337,11 +328,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-l4/switch"> <switch name="hydraulics/spoiler-l4/switch">
<default value="hydraulics/spoiler-l4/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoiler-l4 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-l4/extended"> <test logic="AND" value="hydraulics/spoiler-l4/extended">
/systems/hydraulic/yellow-psi ge 1500 /systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoiler-l4 eq 0 /systems/failures/spoiler-l4 eq 0
@ -405,11 +392,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-l5/switch"> <switch name="hydraulics/spoiler-l5/switch">
<default value="hydraulics/spoiler-l5/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoiler-l5 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-l5/ground-extended"> <test logic="AND" value="hydraulics/spoiler-l5/ground-extended">
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1 spoilers/main-gear-and eq 1
@ -447,15 +430,7 @@
<channel name="Spoiler R1"> <channel name="Spoiler R1">
<switch name="hydraulics/spoiler-r1/switch"> <switch name="hydraulics/spoiler-r1/switch">
<default value="hydraulics/spoiler-r1/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 0
</test>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoiler-r1 eq 1
</test>
<test logic="AND" value="spoilers/main-cmd"> <test logic="AND" value="spoilers/main-cmd">
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1 spoilers/main-gear-and eq 1
@ -545,11 +520,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-r2/switch"> <switch name="hydraulics/spoiler-r2/switch">
<default value="hydraulics/spoiler-r2/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoiler-r2 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-r2/air-extended"> <test logic="AND" value="hydraulics/spoiler-r2/air-extended">
/systems/hydraulic/yellow-psi ge 1500 /systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0 spoilers/main-gear-and eq 0
@ -620,11 +591,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-r3/switch"> <switch name="hydraulics/spoiler-r3/switch">
<default value="hydraulics/spoiler-r3/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/blue-psi ge 1500
/systems/failures/spoiler-r3 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-r3/extended"> <test logic="AND" value="hydraulics/spoiler-r3/extended">
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
/systems/failures/spoiler-r3 eq 0 /systems/failures/spoiler-r3 eq 0
@ -688,11 +655,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-r4/switch"> <switch name="hydraulics/spoiler-r4/switch">
<default value="hydraulics/spoiler-r4/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/yellow-psi ge 1500
/systems/failures/spoiler-r4 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-r4/extended"> <test logic="AND" value="hydraulics/spoiler-r4/extended">
/systems/hydraulic/yellow-psi ge 1500 /systems/hydraulic/yellow-psi ge 1500
spoilers/main-gear-and eq 0 spoilers/main-gear-and eq 0
@ -757,11 +720,7 @@
</fcs_function> </fcs_function>
<switch name="hydraulics/spoiler-r5/switch"> <switch name="hydraulics/spoiler-r5/switch">
<default value="hydraulics/spoiler-r5/switch"/> <default value="0"/>
<test logic="AND" value="0">
/systems/hydraulic/green-psi ge 1500
/systems/failures/spoiler-r5 eq 1
</test>
<test logic="AND" value="hydraulics/spoiler-r5/ground-extended"> <test logic="AND" value="hydraulics/spoiler-r5/ground-extended">
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500
spoilers/main-gear-and eq 1 spoilers/main-gear-and eq 1

View file

@ -1 +1 @@
4603 4606