Board index FlightGear Support Hardware

Joystick Axis for Flaps and Spoilers

Joysticks, pedals, monitors.

Joystick Axis for Flaps and Spoilers

Postby Lucas » Wed Mar 03, 2010 11:49 am

Hello,

I have searched via Google and in this forum and also I have asked in the german FlightGear Forum but nothing could help.

My question is how to setup joystick bindings for flaps and spoilers. I've been successsful in setting up these bindings for all four engine throttle axis but can not find out how to do this for flaps and spoilers.

My joysticks: Saitek X45, CH Pro pedals, FlightSim Yoke and Throttle Quadrant. This question of course refers to the Throttle Quadrant. What I'm looking for, is some kind of list with all "commands" one can use for joystick bindings. For instance I have tried things like <property>/controls/flight/flaps</property> but this seems not to work...

So is there a list of "properties"?

Best regards,

Lucas
Lucas
 
Posts: 3
Joined: Wed Mar 03, 2010 10:21 am

Re: Joystick Axis for Flaps and Spoilers

Postby sim » Sun Mar 21, 2010 10:47 pm

In Windows PC in the FG sub files Tools/ Documentation (FG in start menu not C). There is a readme list of properties in the FlightGear there (see in code box below - but not everything is there!). The other simple way to find what you need is to rummage through the xml files in FG joysticks folder. That contains all but a few items for stick mods, so be a copy-cat, just change the button No or axis No to suit your own stick. Viel Glück, sim


Code: Select all
================================================================================
CONTROLS
================================================================================

Flight Controls
---------------
/controls/flight/aileron
/controls/flight/aileron-trim
/controls/flight/elevator
/controls/flight/elevator-trim
/controls/flight/rudder
/controls/flight/rudder-trim
/controls/flight/flaps
/controls/flight/slats
/controls/flight/BLC         // Boundary Layer Control
/controls/flight/spoilers
/controls/flight/speedbrake
/controls/flight/wing-sweep
/controls/flight/wing-fold
/controls/flight/drag-chute

Engines
-------
/controls/engines/throttle_idle
/controls/engines/engine[%d]/throttle
/controls/engines/engine[%d]/starter
/controls/engines/engine[%d]/fuel-pump
/controls/engines/engine[%d]/fire-switch
/controls/engines/engine[%d]/fire-bottle-discharge
/controls/engines/engine[%d]/cutoff
/controls/engines/engine[%d]/mixture
/controls/engines/engine[%d]/propeller-pitch
/controls/engines/engine[%d]/magnetos
/controls/engines/engine[%d]/boost
/controls/engines/engine[%d]/WEP
/controls/engines/engine[%d]/cowl-flaps-norm
/controls/engines/engine[%d]/feather
/controls/engines/engine[%d]/ignition
/controls/engines/engine[%d]/augmentation
/controls/engines/engine[%d]/afterburner
/controls/engines/engine[%d]/reverser
/controls/engines/engine[%d]/water-injection
/controls/engines/engine[%d]/condition

Fuel
----
/controls/fuel/dump-valve
/controls/fuel/tank[%d]/fuel_selector
/controls/fuel/tank[%d]/to_engine
/controls/fuel/tank[%d]/to_tank
/controls/fuel/tank[%d]/boost-pump[%d]

/consumables/fuel/tank[%d]/level-lb
/consumables/fuel/tank[%d]/level-lbs
/consumables/fuel/tank[%d]/level-gal_us
/consumables/fuel/tank[%d]/capacity-gal_us
/consumables/fuel/tank[%d]/density-ppg
/consumables/fuel/total-fuel-lbs
/consumables/fuel/total-gal_us


Gear
----
/controls/gear/brake-left
/controls/gear/brake-right
/controls/gear/brake-parking
/controls/gear/steering
/controls/gear/gear-down
/controls/gear/antiskid
/controls/gear/tailhook
/controls/gear/tailwheel-lock
/controls/gear/wheel[%d]/alternate-extension

Anti-Ice
--------
/controls/anti-ice/wing-heat
/controls/anti-ice/pitot-heat
/controls/anti-ice/wiper
/controls/anti-ice/window-heat
/controls/anti-ice/engine[%d]/carb-heat
/controls/anti-ice/engine[%d]/inlet-heat

Hydraulics
----------
/controls/hydraulic/system[%d]/engine-pump
/controls/hydraulic/system[%d]/electric-pump

Electric
--------
/controls/electric/battery-switch
/controls/electric/external-power
/controls/electric/APU-generator
/controls/electric/engine[%d]/generator
/controls/electric/engine[%d]/bus-tie

Pneumatic
---------
/controls/pneumatic/APU-bleed
/controls/pneumatic/engine[%d]/bleed

Pressurization
--------------
/controls/pressurization/mode
/controls/pressurization/dump
/controls/pressurization/outflow-valve
/controls/pressurization/pack[%d]/pack-on

Lights
------
/controls/lighting/landing-lights
/controls/lighting/turn-off-lights
/controls/lighting/formation-lights
/controls/lighting/taxi-light
/controls/lighting/logo-lights
/controls/lighting/nav-lights
/controls/lighting/beacon
/controls/lighting/strobe
/controls/lighting/panel-norm
/controls/lighting/instruments-norm
/controls/lighting/dome-norm

Armament
--------
/controls/armament/master-arm
/controls/armament/station-select
/controls/armament/release-all
/controls/armament/station[%d]/stick-size
/controls/armament/station[%d]/release-stick
/controls/armament/station[%d]/release-all
/controls/armament/station[%d]/jettison-all

Seat
----
/controls/seat/vertical-adjust
/controls/seat/fore-aft-adjust
/controls/seat/cmd_selector_valve
/controls/seat/eject[%d]/initiate
/controls/seat/eject[%d]/status

APU
---
/controls/APU/off-start-run
/controls/APU/fire-switch

Autoflight
----------
/controls/autoflight/autopilot[%d]/engage
/controls/autoflight/autothrottle-arm
/controls/autoflight/autothrottle-engage
/controls/autoflight/heading-select
/controls/autoflight/altitude-select
/controls/autoflight/bank-angle-select
/controls/autoflight/vertical-speed-select
/controls/autoflight/speed-select
/controls/autoflight/mach-select
/controls/autoflight/vertical-mode
/controls/autoflight/lateral-mode

================================================================================
FDM (Aircraft settings)
================================================================================

Position
---------------
/position/latitude-deg
/position/longitude-deg
/position/altitude-ft

Orientation
-----------
/orientation/roll-deg
/orientation/pitch-deg
/orientation/heading-deg

/orientation/roll-rate-degps
/orientation/pitch-rate-degps
/orientation/yaw-rate-degps

/orientation/side-slip-rad
/orientation/side-slip-deg
/orientation/alpha-deg

Velocities
----------
/velocities/airspeed-kt
/velocities/mach
/velocities/speed-north-fps
/velocities/speed-east-fps
/velocities/speed-down-fps

/velocities/uBody-fps
/velocities/vBody-fps
/velocities/wBody-fps

/velocities/vertical-speed-fps
/velocities/glideslope

Acceleration
------------
/accelerations/nlf

/accelerations/ned/north-accel-fps_sec
/accelerations/ned/east-accel-fps_sec
/accelerations/ned/down-accel-fps_sec

/accelerations/pilot/x-accel-fps_sec
/accelerations/pilot/y-accel-fps_sec
/accelerations/pilot/z-accel-fps_sec

Engines
-------

common:
/engines/engine[%d]/fuel-flow-gph
/engines/engine[%d]/fuel-flow_pph
/engines/engine[%d]/thrust_lb
/engines/engine[%d]/running
/engines/engine[%d]/starter
/engines/engine[%d]/cranking

piston:
/engines/engine[%d]/mp-osi
/engines/engine[%d]/egt-degf
/engines/engine[%d]/oil-temperature-degf
/engines/engine[%d]/oil-pressure-psi
/engines/engine[%d]/cht-degf
/engines/engine[%d]/rpm

turbine:
/engines/engine[%d]/n1
/engines/engine[%d]/n2
/engines/engine[%d]/epr
/engines/engine[%d]/augmentation
/engines/engine[%d]/water-injection
/engines/engine[%d]/ignition
/engines/engine[%d]/nozzle-pos-norm
/engines/engine[%d]/inlet-pos-norm
/engines/engine[%d]/reversed
/engines/engine[%d]/cutoff

propeller:
/engines/engine[%d]/rpm
/engines/engine[%d]/pitch
/engines/engine[%d]/torque


================================================================================
LIGHT
================================================================================
/sim/time/sun-angle-rad
/rendering/scene/ambient/red
/rendering/scene/ambient/ggreen
/rendering/scene/ambient/blue
/rendering/scene/diffuse/red
/rendering/scene/diffuse/green
/rendering/scene/diffuse/blue
/rendering/scene/specular/red
/rendering/scene/specular/green
/rendering/scene/specular/blue


Code: Select all
<button n="7">
  <desc>Step Flaps Down</desc>
  <repeatable type="bool">false</repeatable>
  <binding>
   <command>nasal</command>
   <script>controls.flapsDown(1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.flapsDown(0)</script>
   </binding>
  </mod-up>
 </button>

 <button n="8">
  <desc>Step Flaps Up</desc>
  <repeatable type="bool">false</repeatable>
  <binding>
   <command>nasal</command>
   <script>controls.flapsDown(-1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.flapsDown(0)</script>
   </binding>
  </mod-up>
 </button>
Last edited by sim on Tue Mar 23, 2010 10:12 pm, edited 1 time in total.
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: Joystick Axis for Flaps and Spoilers

Postby Lucas » Mon Mar 22, 2010 2:09 pm

Hello,

thank you very much for this info.

I always searched for this kind of list and never found it. Perhaps my installation of FG is not complete or I'm just not lucky in finding all the files (I'm using Ubuntu instead of Windows).

Thank you very much - I think, this should help me...


Viele Grüße,

Lucas
Lucas
 
Posts: 3
Joined: Wed Mar 03, 2010 10:21 am

Re: Joystick Axis for Flaps and Spoilers

Postby sim » Tue Mar 23, 2010 10:40 pm

OK Lucas,
Here's one for spoilers or speedbrakes, should work on aeroplanes using either control. Delete setprop-speedbrake if not required. Note it appears here as a mod-up function so spoilers/speedbrake are only applied while you hold down the button!
There is also a stepSpoiler method so spoilers are applied gradually but to hell with that, if you need 'em use 'em!
Kick the tyres. Pull the wires. Light the fires. Cheers, sim

Code: Select all
<button n="7">
  <desc>Spoilers</desc>
  <repeatable type="bool">false</repeatable>
  <binding>
   <command>nasal</command>
   <script>setprop("/controls/flight/spoilers", 1);setprop("/controls/flight/speedbrake", 1);</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>setprop("/controls/flight/spoilers", 0);setprop("/controls/flight/speedbrake", 0);</script>
   </binding>
  </mod-up>
</button>
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: Joystick Axis for Flaps and Spoilers

Postby Lucas » Thu Mar 25, 2010 5:28 pm

Hello,

thank you very much. With your list I finally got it managed to have a working flaps axis with smooth control of flaps. So I now think to be on a good way and will perhaps be able to do all my bindings on my own. Thank you very much again! And sorry for my late reaction - but I just found the time for testing now.


Best regards,

Lucas
Lucas
 
Posts: 3
Joined: Wed Mar 03, 2010 10:21 am

Re: Joystick Axis for Flaps and Spoilers

Postby biloute974 » Thu Jan 28, 2016 10:23 am

Hi,

i have a saitek throttle quadrant and i'm interesting by the code for having flaps on the throttle quadrant.

Regards,
Theddy.
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 193
Joined: Mon Feb 23, 2015 9:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2

Re: Joystick Axis for Flaps and Spoilers

Postby tauchergreg » Thu Jan 28, 2016 11:01 am

hello Theddy

this code is from Saitek-Yoke

Code (): Select all
<button n="14">
<desc type="string">Flaps Up</desc>
<repeatable type="string">false</repeatable>
<binding>
<command type="string">nasal</command>
<script type="string">controls.flapsDown(-1);</script>
</binding>
<mod-up>
<binding>
<command type="string">nasal</command>
<script type="string">controls.flapsDown(0);</script>
</binding>
</mod-up>
</button>
<button n="15">
<desc type="string">Flaps Down</desc>
<repeatable type="string">false</repeatable>
<binding>
<command type="string">nasal</command>
<script type="string">controls.flapsDown(1);</script>
</binding>
<mod-up>
<binding>
<command type="string">nasal</command>
<script type="string">controls.flapsDown(0);</script>
</binding>
</mod-up>
</button>


I hope this helps you

regards
greg
C160 Transall , Twin Otter DHC6, both with small modification
EF2000
ETMN & EDXN under development
User avatar
tauchergreg
 
Posts: 58
Joined: Tue Jul 03, 2012 8:36 am
Location: near ETMN
Callsign: OFD001 ; BRT0192
Version: 20xx
OS: Linux & W7

Re: Joystick Axis for Flaps and Spoilers

Postby sim » Fri Jan 29, 2016 3:28 pm

this code is from Saitek-Yoke

Greg ! :roll: Saitek-Yoke code does not work!
Guess it has too many "strings" attached :wink:

THIS ONE TESTED OK (change button numbers to suit your own requirements)
Code: Select all
<button n="8">
  <desc>Decrease flaps</desc>
  <binding>
   <command>nasal</command>
   <script>controls.flapsDown(-1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.flapsDown(0)</script>
   </binding>
  </mod-up>
 </button>

 <button n="9">
  <desc>Increase flaps</desc>
  <binding>
   <command>nasal</command>
   <script>controls.flapsDown(1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.flapsDown(0)</script>
   </binding>
  </mod-up>
 </button>
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: Joystick Axis for Flaps and Spoilers

Postby biloute974 » Sat Apr 09, 2016 7:55 pm

Hi,

thanks a lot, it's really nice :)
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 193
Joined: Mon Feb 23, 2015 9:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2


Return to Hardware

Who is online

Users browsing this forum: No registered users and 6 guests