Control: Bugfixes in FBW, FADEC

This commit is contained in:
Joshua Davidson 2019-01-23 20:58:44 -05:00
parent 2f492f3d50
commit 3931ca60a9
3 changed files with 29 additions and 7 deletions

View file

@ -281,10 +281,14 @@ var thrust_loop = maketimer(0.04, func {
setprop("/systems/thrust/alpha-floor", 1);
setprop("/systems/thrust/toga-lk", 0);
setprop("/it-autoflight/input/athr", 1);
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
} else if (getprop("/systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
setprop("/systems/thrust/alpha-floor", 0);
setprop("/it-autoflight/input/athr", 1);
setprop("/systems/thrust/toga-lk", 1);
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
}
} else {
setprop("/systems/thrust/alpha-floor", 0);

View file

@ -464,11 +464,6 @@
<output>fbw/roll/pid</output>
</pid>
<pure_gain name="fbw/roll/rudder-inv">
<input>fbw/fmgc/yaw-cmd</input>
<gain>-0.5</gain>
</pure_gain>
<switch name="fbw/roll/gear-law-switch">
<default value="0"/>
<test logic="OR" value="1">
@ -478,6 +473,24 @@
</test>
</switch>
<fcs_function name="fbw/roll/rollout-cmd">
<function>
<product>
<table>
<independentVar lookup="row">/orientation/roll-deg</independentVar>
<tableData>
-30 -30
-1 0
0 0
1 0
30 30
</tableData>
</table>
<value>-0.1</value>
</product>
</function>
</fcs_function>
<switch name="fbw/aileron-output">
<default value="0"/>
<test logic="AND" value="fbw/roll/pid">
@ -488,7 +501,7 @@
fbw/fmgc/enabled eq 0
fbw/roll/gear-law-switch eq 1
</test>
<test logic="AND" value="fbw/roll/rudder-inv">
<test logic="AND" value="fbw/roll/rollout-cmd">
fbw/fmgc/enabled eq 1
position/wow eq 1
/it-fbw/law eq 0
@ -946,6 +959,11 @@
<test logic="AND" value="0.1">
fbw/fmgc/enabled eq 1
position/wow eq 1
gear/unit[0]/WOW eq 0
</test>
<test logic="AND" value="0.05">
fbw/fmgc/enabled eq 1
position/wow eq 1
</test>
<test logic="AND" value="0">
/it-fbw/law eq 3

View file

@ -1 +1 @@
4743
4744