diff --git a/Input/Joysticks/CH/pro-yoke-usb.xml b/Input/Joysticks/CH/pro-yoke-usb.xml index d3ba87c7d..65b167bde 100644 --- a/Input/Joysticks/CH/pro-yoke-usb.xml +++ b/Input/Joysticks/CH/pro-yoke-usb.xml @@ -208,18 +208,16 @@ diff --git a/Input/Joysticks/Microsoft/sidewinder-precision-pro.xml b/Input/Joysticks/Microsoft/sidewinder-precision-pro.xml index d0fb8bfcf..a60f1288c 100644 --- a/Input/Joysticks/Microsoft/sidewinder-precision-pro.xml +++ b/Input/Joysticks/Microsoft/sidewinder-precision-pro.xml @@ -21,7 +21,7 @@ * Button 5: flap down Button A 0010 * Button 6: left brake only Button C 0040 * Button 7: right brake only Button D 0080 -* Button 8(Unix)/9(Win): gear up Shift Button 0100(unix), 0200(Win) +* Button 8(Unix)/9(Win): gear toggle Shift Button 0100(unix), 0200(Win) ************************************************************************ $Id$ --> @@ -257,7 +257,7 @@ $Id$ diff --git a/Input/Joysticks/Saitek/Cyborg-Evo.xml b/Input/Joysticks/Saitek/Cyborg-Evo.xml index 3a6f650cf..27f18e9e7 100644 --- a/Input/Joysticks/Saitek/Cyborg-Evo.xml +++ b/Input/Joysticks/Saitek/Cyborg-Evo.xml @@ -288,7 +288,7 @@ axis 5: (hat up-down) look u/d Trim Elevator Adj Propeller # if (mod == nil or mod == 0) { controls.stepFlaps(-1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 0); + controls.gearDown(0); } elsif (mod == 2) { view.increase(); } elsif (mod == 3) { @@ -309,7 +309,7 @@ axis 5: (hat up-down) look u/d Trim Elevator Adj Propeller # if (mod == nil or mod == 0) { controls.stepFlaps(1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 1); + controls.gearDown(1); } elsif (mod == 2) { view.decrease(); } elsif (mod == 3) { diff --git a/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml b/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml index dec169747..ad30377fe 100644 --- a/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml +++ b/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml @@ -237,7 +237,7 @@ ________________________________________________________________________________ if (mod == 0) { controls.stepFlaps(-1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 0); + controls.gearDown(0); } elsif (mod == 2) { view.stepView(-1); } elsif (mod == 3) { @@ -282,7 +282,7 @@ ________________________________________________________________________________ if (mod == 0) { controls.stepFlaps(1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 1); + controls.gearDown(1); } elsif (mod == 2) { view.stepView(1); } elsif (mod == 3) { diff --git a/Input/Joysticks/Saitek/X45.xml b/Input/Joysticks/Saitek/X45.xml index f92236982..ffb500d83 100644 --- a/Input/Joysticks/Saitek/X45.xml +++ b/Input/Joysticks/Saitek/X45.xml @@ -227,8 +227,8 @@ $Id$ diff --git a/Input/Joysticks/ThrustMaster/Top-Gun-Afterburner.xml b/Input/Joysticks/ThrustMaster/Top-Gun-Afterburner.xml index a28228882..af7178c74 100644 --- a/Input/Joysticks/ThrustMaster/Top-Gun-Afterburner.xml +++ b/Input/Joysticks/ThrustMaster/Top-Gun-Afterburner.xml @@ -271,7 +271,7 @@ ________________________________________________________________________________ if (mod == nil or mod == 0) { controls.stepFlaps(-1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 0); + controls.gearDown(0); } elsif (mod == 2) { view.stepView(-1); } elsif (mod == 3) { @@ -320,7 +320,7 @@ ________________________________________________________________________________ if (mod == nil or mod == 0) { controls.stepFlaps(1); } elsif (mod == 1) { - setprop("/controls/gear/gear-down", 1); + controls.gearDown(1); } elsif (mod == 2) { view.stepView(1); } elsif (mod == 3) { diff --git a/Input/Joysticks/ThrustMaster/Top-Gun-Fox2-Pro-USB.xml b/Input/Joysticks/ThrustMaster/Top-Gun-Fox2-Pro-USB.xml index df391d153..74c989816 100644 --- a/Input/Joysticks/ThrustMaster/Top-Gun-Fox2-Pro-USB.xml +++ b/Input/Joysticks/ThrustMaster/Top-Gun-Fox2-Pro-USB.xml @@ -128,9 +128,8 @@ diff --git a/Nasal/controls.nas b/Nasal/controls.nas index 246d22e45..3ae99ab1b 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -315,3 +315,4 @@ aileronTrimAxis = func { aileronTrim(cmdarg().getNode("value").getValue()); } rudderTrimAxis = func { rudderTrim(cmdarg().getNode("value").getValue()); } gearDown = func { setprop("/controls/gear/gear-down", arg[0]); } +gearToggle = func { gearDown(!getprop("/controls/gear/gear-down")); }