Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
6cd71b1243
3 changed files with 53 additions and 18 deletions
|
@ -27,11 +27,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
load_overlay("generic.xml");
|
|
||||||
if (is_helicopter)
|
|
||||||
load_overlay("helicopter.xml");
|
|
||||||
load_overlay(getprop("/sim/aircraft") ~ ".xml");
|
|
||||||
|
|
||||||
foreach (var b; this.getChildren("button")) {
|
foreach (var b; this.getChildren("button")) {
|
||||||
if (b.getAttribute("children") == 1) {
|
if (b.getAttribute("children") == 1) {
|
||||||
var name = b.getNode("name", 1).getValue() or "??";
|
var name = b.getNode("name", 1).getValue() or "??";
|
||||||
|
@ -44,13 +39,18 @@
|
||||||
setlistener(_, func(n) mod = n.getValue());
|
setlistener(_, func(n) mod = n.getValue());
|
||||||
|
|
||||||
var trimstep = 0.75;
|
var trimstep = 0.75;
|
||||||
|
|
||||||
|
load_overlay("generic.xml");
|
||||||
|
if (is_helicopter)
|
||||||
|
load_overlay("helicopter.xml");
|
||||||
|
load_overlay(getprop("/sim/aircraft") ~ ".xml");
|
||||||
</script>
|
</script>
|
||||||
</nasal>
|
</nasal>
|
||||||
|
|
||||||
<axis n="0">
|
<axis n="0">
|
||||||
<name>X-axis</name>
|
<name>X-axis</name>
|
||||||
<desc>aileron</desc>
|
<desc>aileron</desc>
|
||||||
<tolerance>0.0001</tolerance>
|
<tolerance>0.00001</tolerance>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-scale</command>
|
<command>property-scale</command>
|
||||||
<property>/controls/flight/aileron</property>
|
<property>/controls/flight/aileron</property>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<axis n="1">
|
<axis n="1">
|
||||||
<name>Y-axis</name>
|
<name>Y-axis</name>
|
||||||
<desc>elevator</desc>
|
<desc>elevator</desc>
|
||||||
<tolerance>0.0001</tolerance>
|
<tolerance>0.00001</tolerance>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-scale</command>
|
<command>property-scale</command>
|
||||||
<property>/controls/flight/elevator</property>
|
<property>/controls/flight/elevator</property>
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
</axis>
|
</axis>
|
||||||
|
|
||||||
<button n="0">
|
<button n="0">
|
||||||
<name>Trigger Button 1</name>
|
<name>Trigger Button/Half Pushed</name>
|
||||||
<desc>gun trigger stage 1</desc>
|
<desc>gun trigger stage 1</desc>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button n="5">
|
<button n="5">
|
||||||
<name>Trigger Button 2</name>
|
<name>Trigger Button/Fully Pushed</name>
|
||||||
<desc>gun trigger stage 2</desc>
|
<desc>gun trigger stage 2</desc>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
|
|
@ -27,11 +27,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
load_overlay("generic");
|
|
||||||
if (is_helicopter)
|
|
||||||
load_overlay("helicopter");
|
|
||||||
load_overlay(getprop("/sim/aircraft"));
|
|
||||||
|
|
||||||
foreach (var b; this.getChildren("button")) {
|
foreach (var b; this.getChildren("button")) {
|
||||||
if (b.getAttribute("children") == 1) {
|
if (b.getAttribute("children") == 1) {
|
||||||
var name = b.getNode("name", 1).getValue() or "??";
|
var name = b.getNode("name", 1).getValue() or "??";
|
||||||
|
@ -51,6 +46,11 @@
|
||||||
var t = viewdir[i].getNode("type");
|
var t = viewdir[i].getNode("type");
|
||||||
viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1;
|
viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
load_overlay("generic.xml");
|
||||||
|
if (is_helicopter)
|
||||||
|
load_overlay("helicopter.xml");
|
||||||
|
load_overlay(getprop("/sim/aircraft") ~ ".xml");
|
||||||
</script>
|
</script>
|
||||||
</nasal>
|
</nasal>
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@
|
||||||
|
|
||||||
<axis n="2">
|
<axis n="2">
|
||||||
<name>Right Throttle</name>
|
<name>Right Throttle</name>
|
||||||
<desc>right throttle (odd engines)</desc>
|
<desc>right throttle</desc>
|
||||||
<tolerance>0.0001</tolerance>
|
<tolerance>0.00001</tolerance>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>controls.perEngineSelectedAxisHandler(0)(right_engines)</script>
|
<script>controls.perEngineSelectedAxisHandler(0)(right_engines)</script>
|
||||||
|
@ -104,13 +104,13 @@
|
||||||
|
|
||||||
<axis n="3">
|
<axis n="3">
|
||||||
<name>Left Throttle</name>
|
<name>Left Throttle</name>
|
||||||
<desc>left throttle (even engines)</desc>
|
<desc>left throttle</desc>
|
||||||
<number>
|
<number>
|
||||||
<unix>3</unix>
|
<unix>3</unix>
|
||||||
<mac>3</mac>
|
<mac>3</mac>
|
||||||
<windows>5</windows>
|
<windows>5</windows>
|
||||||
</number>
|
</number>
|
||||||
<tolerance>0.0001</tolerance>
|
<tolerance>0.00001</tolerance>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>controls.perEngineSelectedAxisHandler(0)(left_engines)</script>
|
<script>controls.perEngineSelectedAxisHandler(0)(left_engines)</script>
|
||||||
|
|
35
Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml
Normal file
35
Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!-- left throttle: control thrust vector -->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
<nasal>
|
||||||
|
<script>
|
||||||
|
var thrust_display = func {
|
||||||
|
var thv = getprop("/controls/engines/engine[0]/mixture");
|
||||||
|
popup("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</nasal>
|
||||||
|
|
||||||
|
<axis n="2">
|
||||||
|
<name>Right Throttle</name>
|
||||||
|
<desc>throttle</desc>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.throttleAxis()</script>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="3">
|
||||||
|
<name>Left Throttle</name>
|
||||||
|
<desc>thrust vector</desc>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
controls.mixtureAxis();
|
||||||
|
thrust_display();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
</PropertyList>
|
Loading…
Add table
Reference in a new issue