2014-01-11 20:26:20 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2010-12-19 17:41:14 +00:00
|
|
|
<!--
|
2014-01-11 20:26:20 +00:00
|
|
|
*******************************************************************************
|
|
|
|
Genius F-31U VIBRATION USB Joystick Configuration for Flightgear.
|
|
|
|
Version 2.
|
|
|
|
© 2011, 2014 Martin Měřinský, mermar@centrum.cz, GPLv2 or later.
|
2010-12-19 17:41:14 +00:00
|
|
|
|
|
|
|
Axes:
|
|
|
|
0 - Aileron
|
|
|
|
1 - Elevator
|
|
|
|
2 - Rudder
|
|
|
|
3 - Throttle
|
2014-01-11 20:26:20 +00:00
|
|
|
4 - View left/right hat
|
|
|
|
5 - View up/down hat
|
2010-12-19 17:41:14 +00:00
|
|
|
|
|
|
|
Buttons:
|
2014-01-11 20:26:20 +00:00
|
|
|
0 - Fire primary and secondary weapon (armament trigger).
|
2010-12-19 17:41:14 +00:00
|
|
|
1 - Cycle view
|
|
|
|
2 - Elevator trim up
|
|
|
|
3 - Elevator trim down
|
2014-01-11 20:26:20 +00:00
|
|
|
4 - Flaps up
|
|
|
|
5 - Mixture richer
|
2010-12-19 17:41:14 +00:00
|
|
|
6 - Brakes
|
2014-01-11 20:26:20 +00:00
|
|
|
7 - Flaps down
|
2010-12-19 17:41:14 +00:00
|
|
|
8 - Mixture leaner
|
2014-01-11 20:26:20 +00:00
|
|
|
9 - Landing gear toggle
|
|
|
|
|
|
|
|
Known issues:
|
|
|
|
Flightgear cannot invert left/right "lookat" view, so this is done using Nasal
|
|
|
|
and thus it works when Flightgear is paused, unlike view elevation (up/down).
|
|
|
|
|
|
|
|
In Windows up and down view is inverted.
|
|
|
|
*******************************************************************************
|
2010-12-19 17:41:14 +00:00
|
|
|
-->
|
|
|
|
<PropertyList>
|
|
|
|
<name type="string">Padix Co. Ltd. 10-Button USB Joystick</name> <!-- GNU/Linux. -->
|
|
|
|
<name type="string">10-Button USB Joystick with Vibration</name> <!-- Windows with vibration driver.-->
|
|
|
|
<name type="string">10-Button USB Joystick</name> <!-- Windows without vibration driver.-->
|
|
|
|
|
|
|
|
<axis n="0">
|
|
|
|
<desc>Aileron</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/aileron</property>
|
|
|
|
<power type="int">2</power>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis n="1">
|
|
|
|
<desc>Elevator</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/elevator</property>
|
|
|
|
<power type="int">2</power>
|
2014-01-11 20:26:20 +00:00
|
|
|
<factor type="double">-1.0</factor> <!-- Reverse axis. -->
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Rudder</desc>
|
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
|
|
|
<windows>3</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/rudder</property>
|
|
|
|
<power type="int">2</power>
|
2014-01-11 20:26:20 +00:00
|
|
|
<factor type="double">-1.0</factor> <!-- Reverse axis. -->
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
|
|
|
<desc>Throttle</desc>
|
|
|
|
<number>
|
|
|
|
<unix>3</unix>
|
|
|
|
<windows>2</windows>
|
|
|
|
</number>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.throttleAxis()</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>View direction</desc>
|
2010-12-19 17:41:14 +00:00
|
|
|
<number>
|
|
|
|
<unix>4</unix>
|
|
|
|
<windows>6</windows>
|
|
|
|
</number>
|
|
|
|
<low>
|
|
|
|
<desc>View left</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<!--
|
2014-01-11 20:26:20 +00:00
|
|
|
This also works, but LookAt views have inverted left/right.
|
2010-12-19 17:41:14 +00:00
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/goal-heading-offset-deg</property>
|
|
|
|
<step type="double">3.0</step>
|
|
|
|
-->
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
var valueDelta = -3.0;
|
|
|
|
if (getprop("/sim/current-view/type") == "lookat")
|
|
|
|
{
|
|
|
|
valueDelta = 3.0;
|
|
|
|
}
|
|
|
|
setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/heading-offset-deg") - valueDelta);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<desc>View right</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<!--
|
2014-01-11 20:26:20 +00:00
|
|
|
This also works, but LookAt views have inverted left/right.
|
2010-12-19 17:41:14 +00:00
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/goal-heading-offset-deg</property>
|
|
|
|
<step type="double">-3.0</step>
|
|
|
|
-->
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
var valueDelta = -3.0;
|
|
|
|
if (getprop("/sim/current-view/type") == "lookat")
|
|
|
|
{
|
|
|
|
valueDelta = 3.0;
|
|
|
|
}
|
|
|
|
setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/heading-offset-deg") + valueDelta);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<axis>
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>View elevation</desc>
|
2010-12-19 17:41:14 +00:00
|
|
|
<number>
|
|
|
|
<unix>5</unix>
|
|
|
|
<windows>7</windows>
|
|
|
|
</number>
|
|
|
|
<low>
|
|
|
|
<desc>View down</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
2014-01-11 20:26:20 +00:00
|
|
|
<step type="double">3.0</step>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<desc>View up</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
2014-01-11 20:26:20 +00:00
|
|
|
<step type="double">-3.0</step>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<button n="0">
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>Fire</desc>
|
2010-12-19 17:41:14 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2014-01-11 20:26:20 +00:00
|
|
|
<script>
|
|
|
|
setprop("/controls/armament/trigger", 1);
|
|
|
|
setprop("ai/submodels/trigger", 1);
|
|
|
|
setprop("/controls/armament/trigger1", 1);
|
|
|
|
setprop("ai/submodels/trigger1", 1);
|
|
|
|
</script>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2014-01-11 20:26:20 +00:00
|
|
|
<script>
|
|
|
|
setprop("/controls/armament/trigger", 0);
|
|
|
|
setprop("ai/submodels/trigger", 0);
|
|
|
|
setprop("/controls/armament/trigger1", 0);
|
|
|
|
setprop("ai/submodels/trigger1", 0);
|
|
|
|
</script>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="1">
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>View cycle</desc>
|
2010-12-19 17:41:14 +00:00
|
|
|
<repeatable>false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
view.stepView(1);
|
|
|
|
#gui.popupTip(sprintf("View index: %d, view type: %s", getprop("sim/current-view/view-number"), getprop("/sim/current-view/type")));
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="2">
|
|
|
|
<desc>Elevator trim up</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.elevatorTrim(1)</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="3">
|
|
|
|
<desc>Elevator trim down</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.elevatorTrim(-1)</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="4">
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>Flaps up</desc>
|
|
|
|
<repeatable>false</repeatable>
|
2010-12-19 17:41:14 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2014-01-11 20:26:20 +00:00
|
|
|
<script>controls.flapsDown(-1)</script>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.flapsDown(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="5">
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>Mixture richer</desc>
|
|
|
|
<repeatable>true</repeatable>
|
2010-12-19 17:41:14 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2014-01-11 20:26:20 +00:00
|
|
|
<script>controls.adjMixture(1)</script>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="6">
|
|
|
|
<desc>Brakes</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.applyBrakes(1)</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.applyBrakes(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="7">
|
2014-01-11 20:26:20 +00:00
|
|
|
<desc>Flaps down</desc>
|
2010-12-19 17:41:14 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2014-01-11 20:26:20 +00:00
|
|
|
<script>controls.flapsDown(1)</script>
|
2010-12-19 17:41:14 +00:00
|
|
|
</binding>
|
2014-01-11 20:26:20 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.flapsDown(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2010-12-19 17:41:14 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="8">
|
|
|
|
<desc>Mixture leaner</desc>
|
|
|
|
<repeatable>true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.adjMixture(-1)</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="9">
|
|
|
|
<desc>Landing Gear Toggle</desc>
|
|
|
|
<repeatable>false</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.gearToggle()</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</PropertyList>
|
2014-01-11 20:26:20 +00:00
|
|
|
|