Merge branch 'dev' into 3D
This commit is contained in:
commit
69a7302f04
5 changed files with 27 additions and 9 deletions
|
@ -6159,9 +6159,8 @@
|
|||
<button>3</button>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>controls/flight/elevator-trim</property>
|
||||
<step>0.01</step>
|
||||
<command>nasal</command>
|
||||
<script>libraries.slewPitchWheel(1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
|
@ -6169,9 +6168,8 @@
|
|||
<button>4</button>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>controls/flight/elevator-trim</property>
|
||||
<step>-0.01</step>
|
||||
<command>nasal</command>
|
||||
<script>libraries.slewPitchWheel(-1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
|
|
@ -459,6 +459,23 @@ setlistener("/controls/flight/elevator-trim", func {
|
|||
}
|
||||
}, 0, 0);
|
||||
|
||||
# For the cockpit rotation and anywhere else you want to use it
|
||||
var cmdDegCalc = 0;
|
||||
var slewPitchWheel = func(d) {
|
||||
cmdDegCalc = math.round(pts.Fdm.JSBsim.Hydraulics.ElevatorTrim.cmdDeg.getValue(), 0.1);
|
||||
if (d > 0) { # DN
|
||||
if (cmdDegCalc < 4) {
|
||||
cmdDegCalc = (cmdDegCalc + 0.1) / 13.5; # Add and normalize, NOT 4! 13.5 = 1 on either polarity
|
||||
pts.Controls.Flight.elevatorTrim.setValue(cmdDegCalc);
|
||||
}
|
||||
} else { # UP
|
||||
if (cmdDegCalc > -13.5) {
|
||||
cmdDegCalc = (cmdDegCalc - 0.1) / 13.5; # Subtract and normalize
|
||||
pts.Controls.Flight.elevatorTrim.setValue(cmdDegCalc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##########
|
||||
# Lights #
|
||||
##########
|
||||
|
|
|
@ -97,8 +97,11 @@ var Fdm = {
|
|||
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
|
||||
},
|
||||
Hydraulics: {
|
||||
ElevatorTrim: {
|
||||
cmdDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/elevator-trim/cmd-deg"),
|
||||
},
|
||||
Rudder: {
|
||||
trimDeg: props.globals.getNode("fdm/jsbsim/hydraulics/rudder/trim-deg"),
|
||||
trimDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/rudder/trim-deg"),
|
||||
},
|
||||
},
|
||||
Inertia: {
|
||||
|
|
|
@ -317,7 +317,7 @@
|
|||
<aerosurface_scale name="hydraulics/elevator-trim/cmd-deg">
|
||||
<input>/controls/flight/elevator-trim</input>
|
||||
<domain>
|
||||
<min>-1.00</min>
|
||||
<min>-1.0</min>
|
||||
<max>0.296296</max>
|
||||
</domain>
|
||||
<range>
|
||||
|
|
|
@ -1 +1 @@
|
|||
39
|
||||
40
|
Loading…
Add table
Reference in a new issue