338 lines
6.5 KiB
XML
338 lines
6.5 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
Copyright (c) 2011 Melchior FRANZ mfranz # aon : at
|
|
Work In Progress
|
|
-->
|
|
|
|
<PropertyList>
|
|
<name>Thrustmaster Throttle - HOTAS Warthog</name>
|
|
|
|
<nasal>
|
|
<script>
|
|
var this = cmdarg().getParent();
|
|
var popup = func gui.popupTip(call(sprintf, arg));
|
|
|
|
var even_engines = [0, 2, 4, 6, 8, 10];
|
|
var odd_engines = [1, 3, 5, 7, 9, 11];
|
|
var viewstep = 0.5;
|
|
var viewdir = props.globals.getNode("/sim").getChildren("view");
|
|
forindex (var i; viewdir) {
|
|
var t = viewdir[i].getNode("type");
|
|
viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1;
|
|
}
|
|
|
|
foreach (var b; this.getChildren("button")) {
|
|
if (b.getAttribute("children") == 1) {
|
|
var name = b.getNode("name", 1).getValue() or "??";
|
|
b.setValues({binding: {command: "nasal", script: 'popup("' ~ name ~ '")'}});
|
|
}
|
|
}
|
|
</script>
|
|
</nasal>
|
|
|
|
<axis n="0">
|
|
<name>Mouse Horizontal</name>
|
|
<desc>mouse horizontal</desc>
|
|
<low>
|
|
<repeatable type="bool">true</repeatable>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>view.panViewDir(-viewdir[view.index] * viewstep)</script>
|
|
</binding>
|
|
</low>
|
|
<high>
|
|
<repeatable type="bool">true</repeatable>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>view.panViewDir(viewdir[view.index] * viewstep)</script>
|
|
</binding>
|
|
</high>
|
|
</axis>
|
|
|
|
<axis n="1">
|
|
<name>Mouse Vertical</name>
|
|
<desc>mouse vertical</desc>
|
|
<low>
|
|
<repeatable type="bool">true</repeatable>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>view.panViewPitch(viewstep)</script>
|
|
</binding>
|
|
</low>
|
|
<high>
|
|
<repeatable type="bool">true</repeatable>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>view.panViewPitch(-viewstep)</script>
|
|
</binding>
|
|
</high>
|
|
</axis>
|
|
|
|
<axis n="2">
|
|
<name>Right Throttle</name>
|
|
<desc>right throttle (odd engines)</desc>
|
|
<tolerance>0.0001</tolerance>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>controls.perEngineSelectedAxisHandler(0)(odd_engines)</script>
|
|
</binding>
|
|
</axis>
|
|
|
|
<axis>
|
|
<name>Left Throttle</name>
|
|
<desc>left throttle (even engines)</desc>
|
|
<number>
|
|
<unix>3</unix>
|
|
<mac>3</mac>
|
|
<windows>5</windows>
|
|
</number>
|
|
<tolerance>0.0001</tolerance>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>controls.perEngineSelectedAxisHandler(0)(even_engines)</script>
|
|
</binding>
|
|
</axis>
|
|
|
|
<axis>
|
|
<name>Friction Wheel</name>
|
|
<desc>rudder trim</desc>
|
|
<number>
|
|
<unix>4</unix>
|
|
<mac>4</mac>
|
|
<windows>6</windows>
|
|
</number>
|
|
<binding>
|
|
<command>property-scale</command>
|
|
<property>/controls/flight/rudder</property>
|
|
<factor type="double">-1</factor>
|
|
</binding>
|
|
</axis>
|
|
|
|
<axis>
|
|
<name>Coolie Switch Horizontal</name>
|
|
<number>
|
|
<unix>5</unix>
|
|
<mac>5</mac>
|
|
<windows>3</windows>
|
|
</number>
|
|
<low>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("coolie switch left")</script>
|
|
</binding>
|
|
</low>
|
|
<high>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("coolie switch right")</script>
|
|
</binding>
|
|
</high>
|
|
</axis>
|
|
|
|
<axis>
|
|
<name>Coolie Switch Vertical</name>
|
|
<number>
|
|
<unix>6</unix>
|
|
<mac>6</mac>
|
|
<windows>4</windows>
|
|
</number>
|
|
<low>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("coolie switch up")</script>
|
|
</binding>
|
|
</low>
|
|
<high>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("coolie switch down")</script>
|
|
</binding>
|
|
</high>
|
|
</axis>
|
|
|
|
<button n="0">
|
|
<name>Mouse Button</name>
|
|
<desc>reset view</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>view.resetView()</script>
|
|
</binding>
|
|
</button>
|
|
|
|
<button n="1">
|
|
<name>MIC Switch Push</name>
|
|
<desc>Push To Talk (PTT)</desc>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>controls.ptt(1)</script>
|
|
</binding>
|
|
<mod-up>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>controls.ptt(0)</script>
|
|
</binding>
|
|
</mod-up>
|
|
</button>
|
|
|
|
<button n="2">
|
|
<name>MIC Switch Up</name>
|
|
</button>
|
|
|
|
<button n="3">
|
|
<name>MIC Switch Forward</name>
|
|
</button>
|
|
|
|
<button n="4">
|
|
<name>MIC Switch Down</name>
|
|
</button>
|
|
|
|
<button n="5">
|
|
<name>MIC Switch Aft</name>
|
|
</button>
|
|
|
|
<button n="6">
|
|
<name>Speedbrake Forward</name>
|
|
</button>
|
|
|
|
<button n="7">
|
|
<name>Speedbrake Aft</name>
|
|
</button>
|
|
|
|
<button n="8">
|
|
<name>Boat Switch Forward</name>
|
|
</button>
|
|
|
|
<button n="9">
|
|
<name>Boat Switch Aft</name>
|
|
</button>
|
|
|
|
<button n="10">
|
|
<name>China Hat Forward</name>
|
|
</button>
|
|
|
|
<button n="11">
|
|
<name>China Hat Aft</name>
|
|
</button>
|
|
|
|
<button n="12">
|
|
<name>Pinky Switch Forward</name>
|
|
</button>
|
|
|
|
<button n="13">
|
|
<name>Pinky Switch Aft</name>
|
|
</button>
|
|
|
|
<button n="14">
|
|
<name>Left Throttle Button</name>
|
|
</button>
|
|
|
|
<button n="15">
|
|
<name>Engine Fuel Flow Left</name>
|
|
</button>
|
|
|
|
<button n="16">
|
|
<name>Engine Fuel Flow Right</name>
|
|
</button>
|
|
|
|
<button n="17">
|
|
<name>Engine Operate Left MOTOR</name>
|
|
</button>
|
|
|
|
<button n="18">
|
|
<name>Engine Operate Right MOTOR</name>
|
|
</button>
|
|
|
|
<button n="19">
|
|
<name>APU Start</name>
|
|
</button>
|
|
|
|
<button n="20">
|
|
<name>Landing Gear Horn Silence Button</name>
|
|
</button>
|
|
|
|
<button n="21">
|
|
<name>Flaps Up</name>
|
|
<desc>flaps up</desc>
|
|
<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="22">
|
|
<name>Flaps Down</name>
|
|
<desc>flaps down</desc>
|
|
<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="23">
|
|
<name>EAC Switch</name>
|
|
</button>
|
|
|
|
<button n="24">
|
|
<name>RADAR ALT</name>
|
|
</button>
|
|
|
|
<button n="25">
|
|
<name>Autopilot (Dis)Engage</name>
|
|
</button>
|
|
|
|
<button n="26">
|
|
<name>Autopilot PATH</name>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("autopilot path")</script>
|
|
</binding>
|
|
<mod-up>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("autopilot alt/hdg")</script>
|
|
</binding>
|
|
</mod-up>
|
|
</button>
|
|
|
|
<button n="27">
|
|
<name>Autopilot ALT</name>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("autopilot alt")</script>
|
|
</binding>
|
|
<mod-up>
|
|
<binding>
|
|
<command>nasal</command>
|
|
<script>popup("autopilot alt/hdg")</script>
|
|
</binding>
|
|
</mod-up>
|
|
</button>
|
|
|
|
<button n="28">
|
|
<name>Right Throttle Idle Switch</name>
|
|
</button>
|
|
|
|
<button n="29">
|
|
<name>Left Throttle Idle Switch</name>
|
|
</button>
|
|
|
|
<button n="30">
|
|
<name>Engine Operate Left IGN</name>
|
|
</button>
|
|
|
|
<button n="31">
|
|
<name>Engine Operate Right IGN</name>
|
|
</button>
|
|
</PropertyList>
|