Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!--
- Author: F Tilmann
- Copyright: 2014
- Licence: GPL3
- Note that the following does not contain complete joystick bindings for this joystick but just the initialisation code and bindings for buttons pertaining to the control of the autopilot (buttons 4-9 for the sample joystick)
- -->
- <PropertyList>
- <name>Thrustmaster T.16000M</name>
- <nasal>
- <!-- set autopilot type:
- 1: KAP140 (e.g. c172p)
- 2: CENTURYIII (e.g. senecaII) -->
- <script><![CDATA[
- var autopilottype=0;
- var horizontalmode=0;
- if (getprop("sim/aircraft")=="c172p") {
- print("FOUND KAP140 autopilot");
- autopilottype=1;
- } elsif (getprop("autopilot/CENTURYIII/power")>-1) {
- print("Using CENTURYIII autopilot joystick binding");
- autopilottype=2;
- }
- var showhdgbug=func() {if ( autopilottype==1 ) {
- gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg")));
- } elsif ( autopilottype==2 ) {
- gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));
- }}
- var showroll=func() { if ( autopilottype==2 ) {
- gui.popupTip(sprintf("AP Roll:%2d",getprop("autopilot/CENTURYIII/settings/roll-knob-deg")));}}
- var showcourseselect=func() {
- if ( autopilottype==1 ) {
- gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/nav/radials/selected-deg")));
- } elsif ( autopilottype==2 ) {
- gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/kcs55/ki525/selected-course-deg")));}}
- var showvertical=func() {if ( autopilottype==1 ) {
- if ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {
- gui.popupTip(sprintf("AP VS
- %d",getprop("autopilot/KAP140/settings/target-pressure-rate")*(-58000)));
- }
- } elsif ( autopilottype==2 ) {
- gui.popupTip(sprintf("AP Pitch:%4.1f",getprop("autopilot/CENTURYIII/settings/pitch-wheel-deg")));
- }}
- var showhorizontalmode=func() {
- if ( autopilottype == 1 ) {
- if ( getprop("autopilot/KAP140/locks/roll-arm") == 1 ) {
- gui.popupTip("AP NAV");
- } elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 2 ) {
- gui.popupTip("AP APR");
- } elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 3 ) {
- gui.popupTip("AP REV");
- }
- }
- if (autopilottype == 2) {
- horizontalmode=getprop("autopilot/CENTURYIII/controls/mode");
- if ( horizontalmode==0) {
- gui.popupTip("APmode NAV");
- } elsif ( horizontalmode==1) {
- gui.popupTip("APmode OMNI");
- } elsif ( horizontalmode==2) {
- gui.popupTip("APmode HDG");
- } elsif ( horizontalmode==3) {
- gui.popupTip("APmode LOC");
- } elsif ( horizontalmode==4) {
- gui.popupTip("APmode REV");
- }
- }
- }
- ]]></script>
- </nasal>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement