2008-03-18 20:00:07 +00:00
|
|
|
<?xml version="1.0" ?>
|
2009-03-08 19:42:12 +00:00
|
|
|
<?xml-stylesheet type="text/xsl" href="joystick.xsl"?>
|
2008-03-18 20:00:07 +00:00
|
|
|
<!-- Saitek AV8R/Aviator
|
|
|
|
|
2010-10-30 11:31:15 +00:00
|
|
|
Copyright (C) 2007 - 2010 Anders Gidenstam (anders(at)gidenstam.org)
|
2008-03-18 20:00:07 +00:00
|
|
|
This file is released under the GPL license v2 or later.
|
|
|
|
-->
|
|
|
|
<PropertyList>
|
|
|
|
|
|
|
|
<name>Saitek AV8R Joystick</name>
|
|
|
|
<name>Saitek AV8R Classic Stick</name>
|
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
var self = cmdarg().getParent();
|
|
|
|
var data = self.getNode("data");
|
2009-03-08 19:42:12 +00:00
|
|
|
var modifier = 0;
|
|
|
|
var engine_select_mode = 0;
|
|
|
|
# TM0: All selected; TM1: #1 & #2; TM2: #3 & #4
|
|
|
|
var engine_axis_mode = 0;
|
|
|
|
# Valid only in TM1 and TM2.
|
2010-10-30 11:31:15 +00:00
|
|
|
# EA0: throttle
|
|
|
|
# EA1: mixture
|
|
|
|
# EA2: propeller
|
2009-03-08 19:42:12 +00:00
|
|
|
var quick_view_active = 0;
|
2008-03-18 20:00:07 +00:00
|
|
|
var old_view = view.point.save();
|
|
|
|
var pressed = [0,0,0,0,0,0,0,0,0,0,0,0];
|
2010-10-30 11:31:15 +00:00
|
|
|
# Map engines to throttles for TM1 (0, 1) and TM2 (2, 3)
|
2009-03-08 19:42:12 +00:00
|
|
|
var engine = [0, 1, 2, 3];
|
|
|
|
|
2010-10-30 11:31:15 +00:00
|
|
|
# Do per-aircraft modifications
|
|
|
|
if (contains({"Aircraft/Short_Empire/Models/Short_Empire-model.xml" : 0,
|
|
|
|
"Aircraft/Lockheed1049/Models/Lockheed1049_twa.xml" : 0},
|
|
|
|
getprop("/sim/model/path"))) {
|
|
|
|
# TM1: the outer engines, TM2: the inner engines
|
2009-03-08 19:42:12 +00:00
|
|
|
engine = [0, 3, 1, 2];
|
|
|
|
}
|
2010-10-30 11:31:15 +00:00
|
|
|
if (contains({"Aircraft/DO-X/Models/dox.xml" : 0},
|
|
|
|
getprop("/sim/model/path"))) {
|
|
|
|
engine = [[0, 1, 2, 3, 4, 5], [6, 7, 8, 9, 10, 11],
|
|
|
|
[0, 1, 2, 3, 4, 5], [6, 7, 8, 9, 10, 11]];
|
|
|
|
}
|
2009-03-08 19:42:12 +00:00
|
|
|
|
2008-03-18 20:00:07 +00:00
|
|
|
|
|
|
|
var goal_heading_offset =
|
|
|
|
props.globals.getNode("/sim/current-view/goal-heading-offset-deg", 1);
|
|
|
|
var goal_pitch_offset =
|
|
|
|
props.globals.getNode("/sim/current-view/goal-pitch-offset-deg", 1);
|
|
|
|
|
|
|
|
var headtracking = props.globals.getNode("/sim/headtracking/enabled", 1);
|
|
|
|
|
|
|
|
var kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
|
|
|
var kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
|
|
|
|
|
|
|
var quick_view = func {
|
2010-10-30 11:31:15 +00:00
|
|
|
var dir = arg[0];
|
2008-03-18 20:00:07 +00:00
|
|
|
if (dir == 0) {
|
2009-03-08 19:42:12 +00:00
|
|
|
quick_view_active = 0;
|
2008-03-18 20:00:07 +00:00
|
|
|
view.point.move(old_view, 0.1);
|
|
|
|
headtracking.setIntValue(1);
|
|
|
|
} else {
|
2009-03-08 19:42:12 +00:00
|
|
|
if (quick_view_active == 0) {
|
|
|
|
quick_view_active = 1;
|
2008-03-18 20:00:07 +00:00
|
|
|
old_view = view.point.save();
|
|
|
|
headtracking.setIntValue(0);
|
|
|
|
|
|
|
|
if (dir == 1) {
|
|
|
|
goal_heading_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/left-direction-deg"));
|
|
|
|
goal_pitch_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/pitch-offset-deg"));
|
|
|
|
view.fovProp.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/default-field-of-view-deg"));
|
|
|
|
} if (dir == 2) {
|
|
|
|
goal_heading_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/right-direction-deg"));
|
|
|
|
goal_pitch_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/pitch-offset-deg"));
|
|
|
|
view.fovProp.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/default-field-of-view-deg"));
|
|
|
|
} if (dir == 3) {
|
|
|
|
goal_heading_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/front-direction-deg"));
|
|
|
|
goal_pitch_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/pitch-offset-deg"));
|
|
|
|
view.fovProp.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/default-field-of-view-deg"));
|
|
|
|
} if (dir == 4) {
|
|
|
|
goal_heading_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/back-direction-deg"));
|
|
|
|
goal_pitch_offset.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/pitch-offset-deg"));
|
|
|
|
view.fovProp.setDoubleValue
|
|
|
|
(getprop("/sim/view/config/default-field-of-view-deg"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var trace = func(str) {
|
|
|
|
# Uncomment the line below to trace button presses.
|
|
|
|
#print("Aviator.xml: " ~ str);
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</nasal>
|
|
|
|
|
|
|
|
<!-- Analog axis 0. Aileron -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<axis>
|
|
|
|
<name>Stick left/right</name>
|
|
|
|
<number>
|
|
|
|
<unix>0</unix>
|
|
|
|
<mac>0</mac>
|
|
|
|
<windows>0</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>aileron</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/aileron</property>
|
|
|
|
<dead-band type="double">0.01</dead-band>
|
|
|
|
<offset type="double">0.0</offset>
|
|
|
|
<squared type="bool">true</squared>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Analog axis 1. Elevator -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<axis>
|
|
|
|
<name>Stick forward/back</name>
|
|
|
|
<number>
|
|
|
|
<unix>1</unix>
|
|
|
|
<mac>1</mac>
|
|
|
|
<windows>1</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>elevator</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/elevator</property>
|
|
|
|
<dead-band type="double">0.01</dead-band>
|
|
|
|
<offset type="double">0.0</offset>
|
|
|
|
<factor type="double">-1.0</factor>
|
|
|
|
<squared type="bool">true</squared>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Analog axis 3. Rudder -->
|
|
|
|
<axis>
|
2010-10-30 11:31:15 +00:00
|
|
|
<name>Stick twist</name>
|
2008-03-18 20:00:07 +00:00
|
|
|
<number>
|
|
|
|
<unix>3</unix>
|
|
|
|
<mac>2</mac>
|
|
|
|
<windows>3</windows>
|
|
|
|
</number>
|
|
|
|
<desc>rudder</desc>
|
|
|
|
<binding>
|
|
|
|
<command>property-scale</command>
|
|
|
|
<property>/controls/flight/rudder</property>
|
|
|
|
<dead-band type="double">0.01</dead-band>
|
|
|
|
<offset type="double">0.0</offset>
|
|
|
|
<factor type="double">1.0</factor>
|
|
|
|
<squared type="bool">true</squared>
|
|
|
|
</binding>
|
2010-10-30 11:31:15 +00:00
|
|
|
<!-- binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("sim/current-view/goal-heading-offset-deg",
|
|
|
|
-90.0*cmdarg().getNode("setting").getValue());
|
|
|
|
</script>
|
|
|
|
</binding -->
|
2008-03-18 20:00:07 +00:00
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Analog axis 2. Throttle 1 -->
|
|
|
|
<axis>
|
2010-10-30 11:31:15 +00:00
|
|
|
<name>Left throttle</name>
|
2008-03-18 20:00:07 +00:00
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
|
|
|
<mac>3</mac>
|
|
|
|
<windows>2</windows>
|
|
|
|
</number>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>TM0: throttle, TM1: throttle/propeller 1, TM2: throttle/propeller 3</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2009-03-08 19:42:12 +00:00
|
|
|
if (engine_select_mode == 0) {
|
2008-03-18 20:00:07 +00:00
|
|
|
controls.throttleAxis();
|
|
|
|
} else {
|
2010-10-30 11:31:15 +00:00
|
|
|
controls.perEngineSelectedAxisHandler(engine_axis_mode)
|
|
|
|
((engine_select_mode == 1) ? engine[0] : engine[2]);
|
2008-03-18 20:00:07 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Analog axis 4. Throttle 2 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<axis>
|
|
|
|
<name>Right throttle</name>
|
|
|
|
<number>
|
|
|
|
<unix>4</unix>
|
|
|
|
<mac>4</mac>
|
|
|
|
<windows>4</windows>
|
|
|
|
</number>
|
|
|
|
<desc>TM0: mixture, TM1: throttle/propeller 2, TM2: throttle/propeller 4</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2009-03-08 19:42:12 +00:00
|
|
|
if (engine_select_mode == 0) {
|
2010-10-30 11:31:15 +00:00
|
|
|
controls.mixtureAxis();
|
2008-03-18 20:00:07 +00:00
|
|
|
} else {
|
2010-10-30 11:31:15 +00:00
|
|
|
controls.perEngineSelectedAxisHandler(engine_axis_mode)
|
|
|
|
((engine_select_mode == 1) ? engine[1] : engine[3]);
|
2008-03-18 20:00:07 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Axis 5. Hat left/right -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<axis>
|
|
|
|
<name>Hat left/right</name>
|
|
|
|
<number>
|
|
|
|
<unix>5</unix>
|
|
|
|
<mac>5</mac>
|
|
|
|
<windows>5</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>quick view left/right, +mod: horizontal view pan</desc>
|
|
|
|
<low>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
trace("Axis 5, Hat: low!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.panViewDir(0.5);
|
|
|
|
} else {
|
|
|
|
quick_view(1);
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
quick_view(0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
trace("Axis 5, Hat: high!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.panViewDir(-0.5);
|
|
|
|
} else {
|
|
|
|
quick_view(2);
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2010-10-30 11:31:15 +00:00
|
|
|
<![CDATA[
|
2008-03-18 20:00:07 +00:00
|
|
|
trace("Axis 5, Hat: low released!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
quick_view(0);
|
|
|
|
}
|
2010-10-30 11:31:15 +00:00
|
|
|
]]>
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Axis 6. Hat up/down -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<axis>
|
|
|
|
<name>Hat up/down</name>
|
|
|
|
<number>
|
|
|
|
<unix>6</unix>
|
|
|
|
<mac>6</mac>
|
|
|
|
<windows>6</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>view reset/quick view front, +mod: vertical view pan</desc>
|
|
|
|
<low>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
trace("Axis 6, Hat: low!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.panViewPitch(0.5);
|
|
|
|
} else {
|
|
|
|
view.resetView();
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2010-10-30 11:31:15 +00:00
|
|
|
<![CDATA[
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
#quick_view(0);
|
|
|
|
}
|
2010-10-30 11:31:15 +00:00
|
|
|
]]>
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</low>
|
|
|
|
<high>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
|
|
|
trace("Axis 6, Hat: high!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.panViewPitch(-0.5);
|
|
|
|
} else {
|
|
|
|
quick_view(3);
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2010-10-30 11:31:15 +00:00
|
|
|
<![CDATA[
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
quick_view(0);
|
|
|
|
}
|
2010-10-30 11:31:15 +00:00
|
|
|
]]>
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</high>
|
|
|
|
</axis>
|
|
|
|
|
|
|
|
<!-- Trigger Button -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Trigger</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>0</unix>
|
|
|
|
<mac>0</mac>
|
|
|
|
<windows>0</windows>
|
|
|
|
</number>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>function modifier (mod)</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 0 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
modifier = 1;
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2009-03-08 19:42:12 +00:00
|
|
|
modifier = 0;
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Center Button -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Center button</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>2</unix>
|
|
|
|
<mac>2</mac>
|
|
|
|
<windows>2</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>brakes, +mod: Toggle parking brake</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 2 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
controls.applyParkingBrake(1);
|
|
|
|
} else {
|
|
|
|
controls.applyBrakes(1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controls.applyBrakes(0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Left Button -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Left button</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>1</unix>
|
|
|
|
<mac>1</mac>
|
|
|
|
<windows>1</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>left brake, +mod: PTT</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 1 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
controls.ptt(1);
|
|
|
|
} else {
|
|
|
|
controls.applyBrakes(1, -1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controls.applyBrakes(0, -1);
|
|
|
|
controls.ptt(0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Right Button -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Right button</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>3</unix>
|
|
|
|
<mac>3</mac>
|
|
|
|
<windows>3</windows>
|
|
|
|
</number>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>right brake, +mod: trigger</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 3 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
|
|
|
controls.trigger(1);
|
|
|
|
} else {
|
|
|
|
controls.applyBrakes(1, 1);
|
|
|
|
}
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controls.applyBrakes(0, 1);
|
2009-03-08 19:42:12 +00:00
|
|
|
controls.trigger(0);
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T1 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T1</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>4</unix>
|
|
|
|
<mac>4</mac>
|
|
|
|
<windows>4</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>next view, +mod: zoom in +Shift: next weapon</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 4 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.decrease();
|
|
|
|
} else {
|
|
|
|
if (!pressed[4]) {
|
|
|
|
pressed[4] = 1;
|
2009-03-08 20:08:59 +00:00
|
|
|
view.stepView(1);
|
2008-03-18 20:00:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
2009-03-08 20:08:59 +00:00
|
|
|
<mod-shift>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 4 + shift pressed!");
|
|
|
|
controls.weaponSelect(1);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-shift>
|
2008-03-18 20:00:07 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
pressed[4] = 0;
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T2 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T2</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>5</unix>
|
|
|
|
<mac>5</mac>
|
|
|
|
<windows>5</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>previous view, +mod: zoom out, +Shift: previous weapon</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 5 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
view.increase();
|
|
|
|
} else {
|
|
|
|
if (!pressed[5]) {
|
|
|
|
pressed[5] = 1;
|
2009-03-08 20:08:59 +00:00
|
|
|
view.stepView(-1);
|
2008-03-18 20:00:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
2009-03-08 20:08:59 +00:00
|
|
|
<mod-shift>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 5 + shift pressed!");
|
|
|
|
controls.weaponSelect(-1);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-shift>
|
2008-03-18 20:00:07 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
pressed[5] = 0;
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T3 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T3</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>6</unix>
|
|
|
|
<mac>6</mac>
|
|
|
|
<windows>6</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>trim nose down, +mod: disarm speed brakes</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 6 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
setprop("/controls/flight/speedbrake", 0.0);
|
|
|
|
} else {
|
|
|
|
controls.elevatorTrim(1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T4 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T4</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>7</unix>
|
|
|
|
<mac>7</mac>
|
|
|
|
<windows>7</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>trim nose up, +mod: deploy speed brakes</desc>
|
|
|
|
<repeatable type="bool">true</repeatable>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 7 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
setprop("/controls/flight/speedbrake", 1.0);
|
|
|
|
} else {
|
|
|
|
controls.elevatorTrim(-1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T5 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T5</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>8</unix>
|
|
|
|
<mac>8</mac>
|
|
|
|
<windows>8</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>retract flaps one step, +mod: gear up</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 8 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
controls.flapsDown(-1);
|
|
|
|
} else {
|
|
|
|
controls.gearDown(-1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controls.flapsDown(0);
|
|
|
|
controls.gearDown(0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T6 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T6</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>9</unix>
|
|
|
|
<mac>9</mac>
|
|
|
|
<windows>9</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<desc>deploy flaps one step, +mod: gear down</desc>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 9 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
2008-03-18 20:00:07 +00:00
|
|
|
controls.flapsDown(1);
|
|
|
|
} else {
|
|
|
|
controls.gearDown(1);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controls.flapsDown(0);
|
|
|
|
controls.gearDown(0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T7 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T7</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>10</unix>
|
|
|
|
<mac>10</mac>
|
|
|
|
<windows>10</windows>
|
|
|
|
</number>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>Increase magnetos, +mod: Engine throttle/propeller axis swap</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 10 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
|
|
|
controls.stepMagnetos(1);
|
|
|
|
} else {
|
2010-10-30 11:31:15 +00:00
|
|
|
engine_axis_mode = 2*!engine_axis_mode;
|
2009-03-08 19:42:12 +00:00
|
|
|
}
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: T8 -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
|
|
|
<number>
|
|
|
|
<unix>11</unix>
|
|
|
|
<mac>11</mac>
|
|
|
|
<windows>11</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>T8</name>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>Decrease magnetos, +mod: Engine throttle/propeller axis swap</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Button 11 pressed!");
|
2009-03-08 19:42:12 +00:00
|
|
|
if (!modifier) {
|
|
|
|
controls.stepMagnetos(-1);
|
|
|
|
} else {
|
2010-10-30 11:31:15 +00:00
|
|
|
engine_axis_mode = 2*!engine_axis_mode;
|
2009-03-08 19:42:12 +00:00
|
|
|
}
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Button: 3-way Mode switch -->
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Mode 1</name>
|
2010-10-30 11:31:15 +00:00
|
|
|
<number>
|
|
|
|
<unix>12</unix>
|
|
|
|
<mac>12</mac>
|
|
|
|
<windows>12</windows>
|
|
|
|
</number>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>Engine 0/1 throttle mode</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Mode 1!");
|
2009-03-08 19:42:12 +00:00
|
|
|
engine_select_mode = 1;
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Mode Off!");
|
2009-03-08 19:42:12 +00:00
|
|
|
engine_select_mode = 0;
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</button>
|
2010-10-30 11:31:15 +00:00
|
|
|
<button>
|
|
|
|
<name>Mode 2</name>
|
|
|
|
<number>
|
|
|
|
<unix>13</unix>
|
|
|
|
<mac>13</mac>
|
|
|
|
<windows>13</windows>
|
|
|
|
</number>
|
2008-03-18 20:00:07 +00:00
|
|
|
<name>Mode 2</name>
|
2009-03-08 19:42:12 +00:00
|
|
|
<desc>Engine 2/3 throttle mode</desc>
|
2008-03-18 20:00:07 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
trace("Mode 2!");
|
2009-03-08 19:42:12 +00:00
|
|
|
engine_select_mode = 2;
|
2008-03-18 20:00:07 +00:00
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</PropertyList>
|