From 1a4fa0b16fd2079bc0380e19ad33f0610a208fe6 Mon Sep 17 00:00:00 2001 From: Melchior FRANZ Date: Sun, 11 Sep 2011 19:26:40 +0200 Subject: [PATCH] warthog: fix trimming; more bindings (similar to cougar) --- .../Joysticks/ThrustMaster/Warthog-Stick.xml | 137 +++++++++++++++++- .../ThrustMaster/Warthog-Throttle.xml | 90 ++++++------ .../ThrustMaster/Warthog/Throttle/harrier.xml | 4 +- 3 files changed, 176 insertions(+), 55 deletions(-) diff --git a/Input/Joysticks/ThrustMaster/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog-Stick.xml index 416f43c6f..4b47100ff 100644 --- a/Input/Joysticks/ThrustMaster/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog-Stick.xml @@ -39,6 +39,14 @@ setlistener(_, func(n) mod = n.getValue()); var trimstep = 0.75; + var viewstep = 0.5; + + var reset_zoom = func setprop("/sim/current-view/field-of-view", 55); + var viewdir = props.globals.getNode("/sim").getChildren("view"); + forindex (var i; viewdir) { + var t = viewdir[i].getNode("type"); + viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1; + } load_overlay("generic.xml"); if (is_helicopter) @@ -77,9 +85,9 @@ nasal @@ -89,9 +97,9 @@ nasal @@ -106,9 +114,9 @@ nasal @@ -118,9 +126,9 @@ nasal @@ -187,53 +195,166 @@ diff --git a/Input/Joysticks/ThrustMaster/Warthog-Throttle.xml b/Input/Joysticks/ThrustMaster/Warthog-Throttle.xml index c535f1589..8b5dbc672 100644 --- a/Input/Joysticks/ThrustMaster/Warthog-Throttle.xml +++ b/Input/Joysticks/ThrustMaster/Warthog-Throttle.xml @@ -40,12 +40,6 @@ var left_engines = [0, 2, 4, 6, 8, 10]; var right_engines = [1, 3, 5, 7, 9, 11]; - var viewstep = 0.5; - var viewdir = props.globals.getNode("/sim").getChildren("view"); - forindex (var i; viewdir) { - var t = viewdir[i].getNode("type"); - viewdir[i] = t != nil and t.getValue() == "lookat" ? 1 : -1; - } load_overlay("generic.xml"); if (is_helicopter) @@ -56,40 +50,10 @@ Mouse Horizontal - mouse horizontal - - true - - nasal - - - - - true - - nasal - - - Mouse Vertical - mouse vertical - - true - - nasal - - - - - true - - nasal - - - @@ -129,58 +93,60 @@ property-scale /controls/flight/rudder-trim -1 + 2 Coolie Switch Horizontal + adjust mixture: left = leaner, right = fatter 5 5 3 + true nasal - + + true nasal - + Coolie Switch Vertical + adjust propeller pitch: forward = increase, backward = decrease 6 6 4 + true nasal - + + true nasal - +