1
0
Fork 0

Control: Fix the trim

This commit is contained in:
Josh Davidson 2020-12-01 11:25:31 -05:00
parent 4ce8e6770f
commit 78f4f8ff63
2 changed files with 5 additions and 4 deletions

View file

@ -79,10 +79,10 @@ controls.flapsDown = func(step) {
}
controls.elevatorTrim = func(d) {
if (systems.HYD.Psi.green.getValue() >= 1500) {
slewProp("/controls/flight/elevator-trim", d * 0.0185); # Rate in JSB normalized (0.125 / 13.5)
if (systems.HYD.Psi.green.getValue() >= 1500 or systems.HYD.Psi.yellow.getValue() >= 1500) {
slewProp("/controls/flight/elevator-trim", d * 0.0185); # Rate in JSB normalized (0.25 / 13.5)
} else {
slewProp("/controls/flight/elevator-trim", d * 0.0092) # Rate in JSB normalized (0.125 / 13.5)
slewProp("/controls/flight/elevator-trim", d * 0.0092) # Handcranking?
}
}

View file

@ -372,12 +372,13 @@
<switch name="hydraulics/elevator-trim/rate">
<default value="0"/> <!-- only mechanical input to hyd actuator. So it does need hydraulic power -->
<test logic="OR" value="0">
<test value="0">
/systems/failures/fctl/ths-jam eq 1
</test>
<test logic="OR" value="0.25">
/systems/hydraulic/yellow-psi ge 1500
/systems/hydraulic/green-psi ge 1500
/systems/acconfig/autoconfig-running eq 1
</test>
</switch>