445 lines
13 KiB
XML
445 lines
13 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
Copyright (c) 2021 FlightGear Flight Simulator
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
********************************************************************
|
|
|
|
Written for the Cessna 172 and only tested on Raspberry Pi OS running
|
|
FlightGear 2020.3.6
|
|
|
|
********************************************************************
|
|
-->
|
|
|
|
|
|
<!--
|
|
********************************************************************
|
|
*
|
|
* Bindings for Honeycomb Aeronautical Bravo Trottle Quadrant
|
|
*
|
|
*
|
|
* Axis 0: Engine 1
|
|
* Axis 1: Speed brake
|
|
* Axis 2: Flaps
|
|
* Axis 3: Engine 4
|
|
* Axis 4: Engine 3
|
|
* Axis 5: Engine 2
|
|
*
|
|
* Button 0: Autopilot - Heading Hold
|
|
* Button 1: Autopilot - Nav Hold
|
|
* Button 2: Autopilot - APR
|
|
* Button 3: Autopilot - REV
|
|
* Button 4: Autopilot - ALT Hold
|
|
* Button 5: Autopilot - Vertical Speed hold
|
|
* Button 6: Autopilot - IAS Hold
|
|
* Button 7: Autopilot - Toggle AP engage
|
|
* Button 8: Reverse Thrust - Engine 1
|
|
* Button 9: Reverse Thrust - Engine 2
|
|
* Button 10: Reverse Thrust - Engine 3
|
|
* Button 11: Reverse Thrust - Engine 4
|
|
* Button 12: Increase - IAS / CRS / HDG / VS / ALT
|
|
* Button 13: Decrease - IAS / CRS / HDG / VS / ALT
|
|
* Button 14: Flaps Down
|
|
* Button 15: Flaps UP
|
|
* Button 16: Select IAS
|
|
* Button 17: Select CRS
|
|
* Button 18: Select HDG
|
|
* Button 19: Select VS
|
|
* Button 20: Select ALT
|
|
* Button 21: Trim Down
|
|
* Button 22: Trim Up
|
|
* Button 23: Handle 1 (left) - Fully down
|
|
* Button 24: Handle 2 (eng1) - Fully down
|
|
* Button 25: Handle 3 (eng2) - Fully down
|
|
* Button 26: Handle 4 (eng3) - Fully down
|
|
* Button 27: Handle 5 (eng4) - Fully down
|
|
* Button 28: - Switch on Handle 1
|
|
* Button 29: -
|
|
* Button 30: Gear Up
|
|
* Button 31: Gear Down
|
|
* Button 32: Handle 6 (right) - Fully down
|
|
* Button 33: Switch 1 - up
|
|
* Button 34: Switch 1 - down
|
|
* Button 35: Switch 2 - up
|
|
* Button 36: Switch 2 - down
|
|
* Button 37: Switch 3 - up
|
|
* Button 38: Switch 3 - down
|
|
* Button 39: Switch 4 - up
|
|
* Button 40: Switch 4 - down
|
|
* Button 41: Switch 5 - up
|
|
* Button 42: switch 5 - down
|
|
* Button 43: Switch 6 - up
|
|
* Button 44: Switch 6 - down
|
|
* Button 45: Switch 7 - up
|
|
* Button 46: Switch 7 - down
|
|
* Button 47:
|
|
|
|
********************************************************************
|
|
-->
|
|
|
|
<PropertyList>
|
|
<name type="string">Honeycomb Aeronautical Bravo Throttle Quadrant</name>
|
|
<debug-events type="bool">true</debug-events>
|
|
|
|
<event> <!-- Axis 0 -->
|
|
<desc>Throttle Engine 1</desc>
|
|
<name>abs-x-translate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[1]/throttle</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
|
|
</binding>
|
|
</event>
|
|
|
|
<event> <!-- Axis 1 -->
|
|
<desc>Throttle Engine 0</desc>
|
|
<name>abs-y-translate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[0]/throttle</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
|
|
</binding>
|
|
</event>
|
|
|
|
<event> <!-- Axis 2 -->
|
|
<desc>Mixture Engine 1</desc>
|
|
<name>abs-z-translate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[1]/mixture</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
</binding>
|
|
</event>
|
|
|
|
<event> <!-- Axis 3 -->
|
|
<desc>Mixture Engine 0</desc>
|
|
<name>abs-x-rotate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[0]/mixture</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
|
|
</binding>
|
|
</event>
|
|
|
|
<event> <!-- Axis 4 -->
|
|
<desc>Propellor Pitch Engine 1</desc>
|
|
<name>abs-y-rotate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[1]/propeller-pitch</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
</binding>
|
|
</event>
|
|
|
|
<event> <!-- Axis 5 -->
|
|
<desc>Propellor Pitch Engine 0</desc>
|
|
<name>abs-z-rotate</name>
|
|
<binding>
|
|
<command type="string">property-scale</command>
|
|
<property type="string">/controls/engines/engine[0]/propeller-pitch</property>
|
|
<!--<factor type="double">0.5</factor>
|
|
<offset type="double">1</offset>
|
|
<power type="double">1</power> -->
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-trigger</name>
|
|
<desc type="string">AP: Select Heading Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/lateral", 1);
|
|
if ( node.getValue() == "dg-heading-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-heading-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-thumb</name>
|
|
<desc type="string">AP: Select NAV1 Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/lateral", 1);
|
|
if ( node.getValue() == "dg-nav1-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-nav1-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-thumb2</name>
|
|
<desc type="string">AP: Select Approach Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/lateral", 1);
|
|
if ( node.getValue() == "dg-apr-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-apr-hold" );
|
|
}
|
|
node = props.globals.getNode("/controls/autopilot/inputs/vertical", 1);
|
|
if ( node.getValue() == "dg-apr-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-apr-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-top</name>
|
|
<desc type="string">AP: Select REV Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/lateral", 1);
|
|
if ( node.getValue() == "dg-rev-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-rev-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-top2</name>
|
|
<desc type="string">AP: Select ALT Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/vertical", 1);
|
|
if ( node.getValue() == "dg-alt-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-alt-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-pinkie</name>
|
|
|
|
<desc type="string">AP: Select VS Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/vertical", 1);
|
|
if ( node.getValue() == "dg-vs-hold" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "dg-vs-hold" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-base</name>
|
|
<desc type="string">AP: Select VS Hold</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/speed", 1);
|
|
if ( node.getValue() == "ias" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "ias" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-base2</name>
|
|
<desc type="string">AP: Master Switch</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/master", 1);
|
|
if ( node.getValue() == "active" ) {
|
|
node.setValue( "" );
|
|
} else {
|
|
node.setValue( "active" );
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-302</name>
|
|
<desc type="string">Flaps Down</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">controls.flapsDown(1);</script>
|
|
</binding>
|
|
<repeatable type="double">0</repeatable>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-dead</name>
|
|
<desc type="string">Flaps Up</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">controls.flapsDown(-1);</script>
|
|
</binding>
|
|
<repeatable type="double">0</repeatable>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-704</name>
|
|
<desc type="string">AP: Change IAS</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/selector", 1);
|
|
node.setValue( "ias" );
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-705</name>
|
|
<desc type="string">AP: Change CRS</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/selector", 1);
|
|
node.setValue( "crs" );
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-706</name>
|
|
<desc type="string">AP: Change HDG</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/selector", 1);
|
|
node.setValue( "hdg" );
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-707</name>
|
|
|
|
<desc type="string">AP: Change VS</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/selector", 1);
|
|
node.setValue( "vs" );
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-708</name>
|
|
<desc type="string">AP: Change ALT</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script>
|
|
node = props.globals.getNode("/controls/autopilot/inputs/selector", 1);
|
|
node.setValue( "alt" );
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
|
|
<event>
|
|
<name>button-709</name>
|
|
<desc type="string">Elevator Trim Down</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">controls.elevatorTrim(1);</script>
|
|
</binding>
|
|
<repeatable type="double">1</repeatable>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-710</name>
|
|
|
|
<desc type="string">Elevator Trim Up</desc>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">controls.elevatorTrim(-1);</script>
|
|
</binding>
|
|
<repeatable type="double">1</repeatable>
|
|
</event>
|
|
|
|
|
|
<event>
|
|
<name>button-718</name>
|
|
|
|
<desc type="string">Gear Up</desc>
|
|
<repeatable type="string">false</repeatable>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">
|
|
<!-- check for weight on wheels, because the event initialization code triggers this event, causing at least some aircraft to crash -->
|
|
node = props.globals.getNode("/gear/gear/wow", 1);
|
|
if ( !node.getValue() ) {
|
|
controls.gearDown(-1);
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
|
|
<event>
|
|
<name>button-719</name>
|
|
|
|
<desc type="string">Gear Down</desc>
|
|
<repeatable type="string">false</repeatable>
|
|
<binding>
|
|
<command type="string">nasal</command>
|
|
<script type="string">
|
|
<!-- check for weight on wheels, because the event initialization code triggers this event, causing at least some aircraft to crash -->
|
|
node = props.globals.getNode("/gear/gear/wow", 1);
|
|
if ( !node.getValue() ) {
|
|
controls.gearDown(1);
|
|
}
|
|
</script>
|
|
</binding>
|
|
</event>
|
|
</PropertyList>
|