<?xml version="1.0"?>

<!--
************************************************************************
* Bindings for Logitech WingMan Strike Force 3D joystick.
*
* This joystick is dual-mode: it can connect either through the
* gameport or through a USB port.  Bindings are as follow:
*
* Axis 0: ailerons              lotki
* Axis 1: elevator              ster wysokosci
* Axis 2 (twist): rudder        ster kierunku
* Axis 3 (slider): throttle     przepustnica
* Axes 4 and 5 (hat): view direction
*
* Button  0 (trigger): all brakes    hamulce
* Button  1 (02): elevator trim up   trymer steru wysokosci
* Button  2 (03): elevator trim down trymer steru wysokosci
* Button  9 (H2 up): mixture richer
* Button 11 (H2 down): mixture leaner
* Button 12 (H2 left): left brake only
* Button 10 (H2 right): right brake only
* Button  4 (05): Flaps Down
* Button  5 (06): Flaps Up
* Button  6 (07): Landing Gear Up/Down toggle
* Button  3 (04): View Cycle

************************************************************************
$Id$
-->

<PropertyList>

	<name>Logitech Inc. WingMan Strike Force 3D</name>

	<axis n="0">
		<desc>Aileron</desc>
		<binding>
			<command>property-scale</command>
			<property>/controls/flight/aileron</property>
			<squared>true</squared>
			<factor type="double">5.0</factor>
		</binding>
	</axis>

	<axis n="1">
		<desc>Elevator</desc>
		<binding>
			<command>property-scale</command>
			<property>/controls/flight/elevator</property>
			<factor type="double">-5.0</factor>
			<squared>true</squared>
		</binding>
	</axis>

	<axis n="2">
		<desc>Rudder</desc>
		<binding>
			<command>property-scale</command>
			<property>/controls/flight/rudder</property>
			<factor type="double">3.0</factor>
			<squared>true</squared>
		</binding>
	</axis>

	<axis n="3">
		<desc>Throttle</desc>
		<binding>
			<command>nasal</command>
			<script>controls.throttleAxis()</script>
		</binding>
	</axis>

	<!-- The next two axes are the view hat -->

	<axis n="4">
		<desc>View left</desc>
		<binding>
			<command>property-scale</command>
			<property>/sim/current-view/axes/lat</property>
		</binding>
	</axis>

	<axis n="5">
		<desc>View right</desc>
		<binding>
			<command>property-scale</command>
			<property>/sim/current-view/axes/long</property>
		</binding>
	</axis>

	<button n="3">
		<desc>View Cycle</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>view.stepView(1)</script>
		</binding>
	</button>

	<button n="0">
		<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="1">
		<desc>Aileron trim right</desc>
		<repeatable>true</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.elevatorTrim(0.75)</script>
		</binding>
	</button>

	<button n="2">
		<desc>Aileron trim left</desc>
		<repeatable>true</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.elevatorTrim(-0.75)</script>
		</binding>
	</button>

	<button n="9">
		<desc>Mixture richer</desc>
		<repeatable>true</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.adjMixture(1)</script>
		</binding>
	</button>

	<button n="11">
		<desc>Mixture leaner</desc>
		<repeatable>true</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.adjMixture(-1)</script>
		</binding>
	</button>

	<button n="12">
		<desc>Apply left brakes</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.applyBrakes(1,-1)</script>
		</binding>
		<mod-up>
			<binding>
				<command>nasal</command>
				<script>controls.applyBrakes(0,-1)</script>
			</binding>
		</mod-up>
	</button>

	<button n="10">
		<desc>Apply right brakes</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.applyBrakes(1,1)</script>
		</binding>
		<mod-up>
			<binding>
				<command>nasal</command>
				<script>controls.applyBrakes(0,1)</script>
			</binding>
		</mod-up>
	</button>

	<button n="5">
		<desc>Flaps Up</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.flapsDown(-1)</script>
		</binding>
		<mod-up>
			<binding>
				<command>nasal</command>
				<script>controls.flapsDown(0)</script>
			</binding>
		</mod-up>
	</button>

	<button n="4">
		<desc>Flaps Down</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.flapsDown(1)</script>
		</binding>
		<mod-up>
			<binding>
				<command>nasal</command>
				<script>controls.flapsDown(0)</script>
			</binding>
		</mod-up>
	</button>

	<button n="6">
		<desc>Gear Toggle</desc>
		<repeatable>false</repeatable>
		<binding>
			<command>nasal</command>
			<script>controls.gearToggle()</script>
		</binding>
	</button>

</PropertyList>