1
0
Fork 0

Initial bindings for the GoFlight TQ6-ADV.

Currently configured for the 737NG only, and the speed brake lever assumes a normalised, not indexed, speed brake level property.
This commit is contained in:
James Turner 2013-01-19 12:23:09 +00:00
parent 45051ae33c
commit 5828bbacde

View file

@ -0,0 +1,156 @@
<?xml version="1.0"?>
<!-- GoFLight TQ-6 (advanced) throttle quadrant
Copyright (C) 2013 James Turner
This file is released under the GPL license version 2.
-->
<PropertyList>
<name>TQ6</name>
<nasal>
<script>
<![CDATA[
var MIN_READING = -0.7;
var MAX_READING = 0.62;
var clamp = func(v) { v < 0 ? 0 : v > 1 ? 1 : v }
var normalisedValue = func {
var raw = cmdarg().getNode('setting').getValue();
var range = MAX_READING - MIN_READING;
return clamp((raw - MIN_READING) / range);
};
var normalisedInvertedValue = func {
return 1 - normalisedValue();
};
]]>
</script>
</nasal>
<!-- Levers left to right. -->
<axis>
<name>Left lever</name>
<number>
<unix>0</unix>
<mac>0</mac>
<windows>0</windows>
</number>
<desc>Speedbrake</desc>
<binding>
<command>nasal</command>
<script>setprop('/controls/flight/speedbrake-lever', normalisedValue());</script>
</binding>
</axis>
<axis>
<name>Lever 2</name>
<number>
<unix>1</unix>
<mac>1</mac>
<windows>1</windows>
</number>
<desc>Not used</desc>
</axis>
<axis>
<name>Left engine throttle</name>
<number>
<unix>2</unix>
<mac>2</mac>
<windows>2</windows>
</number>
<desc>Left engine throttle</desc>
<binding>
<command>nasal</command>
<script>setprop('/controls/engines/engine[0]/throttle', normalisedInvertedValue());</script>
</binding>
</axis>
<axis>
<name>Right engine throttle</name>
<number>
<unix>3</unix>
<mac>3</mac>
<windows>3</windows>
</number>
<desc>Right engine throttle</desc>
<binding>
<command>nasal</command>
<script>setprop('/controls/engines/engine[1]/throttle', normalisedInvertedValue());</script>
</binding>
</axis>
<axis>
<name>Lever 5</name>
<number>
<unix>4</unix>
<mac>4</mac>
<windows>4</windows>
</number>
<desc>Not used</desc>
</axis>
<axis>
<name>Flaps level</name>
<number>
<unix>5</unix>
<mac>5</mac>
<windows>5</windows>
</number>
<desc>Flaps</desc>
<binding>
<command>nasal</command>
<script>setprop('/controls/flight/flaps', normalisedValue());</script>
</binding>
</axis>
<!-- A/T disconnect button -->
<button>
<name>A/T disconnect</name>
<number>
<unix>0</unix>
<mac>0</mac>
<windows>0</windows>
</number>
<desc>Auto-Throttle Disconnect</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>debug.dump('A/T disconnect')</script>
</binding>
</button>
<button n="1">
<name>TO/GA</name>
<number>
<unix>3</unix>
<mac>3</mac>
<windows>3</windows>
</number>
<desc>Takeoff/Go-Around</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>debug.dump('TO/GA!')</script>
</binding>
</button>
<button n="2">
<name>Reverser - left</name>
<number>
<unix>1</unix>
<mac>1</mac>
<windows>1</windows>
</number>
<desc>Left reverser</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>debug.dump('left reverse thrust')</script>
</binding>
</button>
</PropertyList>