1
0
Fork 0

Convert to Nasal bindings.

This commit is contained in:
andy 2003-12-26 19:53:22 +00:00
parent 485d0d92d2
commit 4396fe8157
2 changed files with 22 additions and 158 deletions

View file

@ -35,52 +35,8 @@ joystick, and that the first button is the trigger.
<axis n="2"> <axis n="2">
<desc>Throttle</desc> <desc>Throttle</desc>
<binding> <binding>
<command>property-scale</command> <command>nasal</command>
<property>/controls/engines/engine[0]/throttle</property> <script>controls.throttleAxis()</script>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[1]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[2]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[3]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[4]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[5]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[6]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[7]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding> </binding>
</axis> </axis>
@ -95,35 +51,13 @@ joystick, and that the first button is the trigger.
<button n="0"> <button n="0">
<desc>Brakes</desc> <desc>Brakes</desc>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>/controls/gear/wheel[0]/brake</property> <script>props.setAll("/controls/gear/wheel", "brake", 1)</script>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<value type="double">1.0</value>
</binding> </binding>
<mod-up> <mod-up>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>/controls/gear/wheel[0]/brake</property> <script>props.setAll("/controls/gear/wheel", "brake", 0)</script>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<value type="double">0.0</value>
</binding> </binding>
</mod-up> </mod-up>
</button> </button>
@ -132,9 +66,8 @@ joystick, and that the first button is the trigger.
<desc>Elevator trim up</desc> <desc>Elevator trim up</desc>
<repeatable type="bool">true</repeatable> <repeatable type="bool">true</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>/controls/flight/elevator-trim</property> <script>controls.elevatorTrim(1)</script>
<step type="double">0.001</step>
</binding> </binding>
</button> </button>
@ -142,9 +75,8 @@ joystick, and that the first button is the trigger.
<desc>Elevator trim down</desc> <desc>Elevator trim down</desc>
<repeatable type="bool">true</repeatable> <repeatable type="bool">true</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>/controls/flight/elevator-trim</property> <script>controls.elevatorTrim(-1)</script>
<step type="double">-0.001</step>
</binding> </binding>
</button> </button>

View file

@ -34,87 +34,21 @@ $Id$
<axis n="2"> <axis n="2">
<desc>Throttle</desc> <desc>Throttle</desc>
<binding> <binding>
<command>property-scale</command> <command>nasal</command>
<property>/controls/engines/engine[0]/throttle</property> <script>controls.throttleAxis()</script>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[1]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[2]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[3]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[4]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[5]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[6]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding>
<binding>
<command>property-scale</command>
<property>/controls/engines/engine[7]/throttle</property>
<offset type="double">-1.0</offset>
<factor type="double">-0.5</factor>
</binding> </binding>
</axis> </axis>
<button n="0"> <button n="0">
<desc>Brakes</desc> <desc>Brakes</desc>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>/controls/gear/wheel[0]/brake</property> <script>props.setAll("/controls/gear/wheel", "brake", 1)</script>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<value type="double">1.0</value>
</binding> </binding>
<mod-up> <mod-up>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>/controls/gear/wheel[0]/brake</property> <script>props.setAll("/controls/gear/wheel", "brake", 0)</script>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<value type="double">0.0</value>
</binding> </binding>
</mod-up> </mod-up>
</button> </button>
@ -123,9 +57,8 @@ $Id$
<desc>Elevator trim up</desc> <desc>Elevator trim up</desc>
<repeatable type="bool">true</repeatable> <repeatable type="bool">true</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>/controls/flight/elevator-trim</property> <script>controls.elevatorTrim(1)</script>
<step type="double">0.001</step>
</binding> </binding>
</button> </button>
@ -133,9 +66,8 @@ $Id$
<desc>Elevator trim down</desc> <desc>Elevator trim down</desc>
<repeatable type="bool">true</repeatable> <repeatable type="bool">true</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>/controls/flight/elevator-trim</property> <script>controls.elevatorTrim(-1)</script>
<step type="double">-0.001</step>
</binding> </binding>
</button> </button>