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>
|
<button>3</button>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>nasal</command>
|
||||||
<property>controls/flight/elevator-trim</property>
|
<script>libraries.slewPitchWheel(1);</script>
|
||||||
<step>0.01</step>
|
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -6169,9 +6168,8 @@
|
||||||
<button>4</button>
|
<button>4</button>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>nasal</command>
|
||||||
<property>controls/flight/elevator-trim</property>
|
<script>libraries.slewPitchWheel(-1);</script>
|
||||||
<step>-0.01</step>
|
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
|
@ -459,6 +459,23 @@ setlistener("/controls/flight/elevator-trim", func {
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 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 #
|
# Lights #
|
||||||
##########
|
##########
|
||||||
|
|
|
@ -97,8 +97,11 @@ var Fdm = {
|
||||||
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
|
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
|
||||||
},
|
},
|
||||||
Hydraulics: {
|
Hydraulics: {
|
||||||
|
ElevatorTrim: {
|
||||||
|
cmdDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/elevator-trim/cmd-deg"),
|
||||||
|
},
|
||||||
Rudder: {
|
Rudder: {
|
||||||
trimDeg: props.globals.getNode("fdm/jsbsim/hydraulics/rudder/trim-deg"),
|
trimDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/rudder/trim-deg"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Inertia: {
|
Inertia: {
|
||||||
|
|
|
@ -317,7 +317,7 @@
|
||||||
<aerosurface_scale name="hydraulics/elevator-trim/cmd-deg">
|
<aerosurface_scale name="hydraulics/elevator-trim/cmd-deg">
|
||||||
<input>/controls/flight/elevator-trim</input>
|
<input>/controls/flight/elevator-trim</input>
|
||||||
<domain>
|
<domain>
|
||||||
<min>-1.00</min>
|
<min>-1.0</min>
|
||||||
<max>0.296296</max>
|
<max>0.296296</max>
|
||||||
</domain>
|
</domain>
|
||||||
<range>
|
<range>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
39
|
40
|
Loading…
Add table
Reference in a new issue