Board index FlightGear Development New features

Updated Joystick Configuration

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Updated Joystick Configuration

Postby jack » Wed Dec 22, 2010 9:11 pm

I've made a new joystick configuration suited best to the Logitech Attack 3. Though it should work fine with any 11 button joystick. This configuration should work well with helicopters and planes.

If you want to try it, just replace Inputs/Joysticks/Default/joystick.xml with this new joystick.xml

Code: Select all
<?xml version="1.0"?>

<PropertyList>

 <name>default</name>

 <axis n="0">
  <desc>Aileron</desc>
  <binding>
   <command>property-scale</command>
   <property>/controls/flight/aileron</property>
   <squared type="bool">true</squared>
  </binding>
 </axis>

 <axis n="1">
  <desc>Elevator</desc>
  <binding>
   <command>property-scale</command>
   <property>/controls/flight/elevator</property>
   <factor type="double">-1.0</factor>
   <squared type="bool">true</squared>
  </binding>
 </axis>

 <axis n="2">
  <desc>Throttle</desc>
  <binding>
   <command>nasal</command>
   <script>controls.throttleAxis()</script>
  </binding>
 </axis>

 <button n="0">
   <desc>Trigger</desc>
   <binding>
     <command>nasal</command>
     <script>
       setprop("/controls/armament/trigger", 1);
     </script>
   </binding>
   <mod-up>
     <binding>
       <command>nasal</command>
     <script>
       setprop("/controls/armament/trigger", 0);
     </script>
     </binding>
   </mod-up>
 </button>

 <button n="1">
  <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>

 <button n="2">
  <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="3">
  <desc>Move rudder left</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/rudder</property>
   <step type="double">-0.03</step>
  </binding>
 </button>

 <button n="4">
  <desc>Move rudder right</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/rudder</property>
   <step type="double">0.03</step>
  </binding>
 </button>

 <button n="5">
  <desc>Increase elevator trim</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/elevator-trim</property>
   <step type="double">0.01</step>
  </binding>
 </button>

 <button n="6">
  <desc>Decrease elevator trim</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/elevator-trim</property>
   <step type="double">-0.01</step>
  </binding>
 </button>

 <button n="7">
  <desc>Gear Up</desc>
  <binding>
   <command>nasal</command>
   <script>controls.gearDown(-1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.gearDown(0)</script>
   </binding>
  </mod-up>
 </button>

 <button n="8">
  <desc>Gear down</desc>
  <binding>
   <command>nasal</command>
   <script>controls.gearDown(1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.gearDown(0)</script>
   </binding>
  </mod-up>
 </button>

 <button n="9">
  <desc>Toggle speedbrake</desc>
  <binding>
   <command>property-toggle</command>
   <property>/controls/flight/speedbrake</property>
  </binding>
 </button>

 <button n="10">
  <desc>Center aileron, elevator, and rudder</desc>
  <binding>
   <command>nasal</command>
   <script>controls.centerFlightControls()</script>
  </binding>
 </button>

</PropertyList>


Details on the configuration:

Image
For Military Aircraft, Scenery, and more, visit http://alphashangar.co.nr/

'Retired' from FlightGear as of July 2011. You can contact me via my website if you'd like to pick up any old projects.
User avatar
jack
Retired
 
Posts: 1432
Joined: Tue Mar 02, 2010 11:26 pm
Location: KLVK
Callsign: Alpha-J, Rescue1
Version: GIT
OS: Mac OS X

Re: Updated Joystick Configuration

Postby the4thchild » Wed Dec 22, 2010 10:05 pm

This is awesome! I've been trying to use the Logitech profiler for customizing settings, to no avail. Looking forward to trying out your new configuration. Thanks for posting!
the4thchild
 
Posts: 9
Joined: Sun Dec 19, 2010 9:12 am
OS: Mac OS X

Re: Updated Joystick Configuration

Postby jack » Thu Dec 23, 2010 8:55 am

You're welcome. Glad somebody was able to make use of it! :D
For Military Aircraft, Scenery, and more, visit http://alphashangar.co.nr/

'Retired' from FlightGear as of July 2011. You can contact me via my website if you'd like to pick up any old projects.
User avatar
jack
Retired
 
Posts: 1432
Joined: Tue Mar 02, 2010 11:26 pm
Location: KLVK
Callsign: Alpha-J, Rescue1
Version: GIT
OS: Mac OS X

Re: Updated Joystick Configuration

Postby F-VEBR » Thu Dec 23, 2010 9:04 am

:D

Got the same joystick but i configured it differently....

- Instead of rudder i placed the aileron trim (very useful with those powerful warbirds)
- Instead of flaps i placed the elevators trim
- instead of air brakes the gear
- Instead of Elevator the flaps
- instead of Gear the brakes i used them for Brake (Left/Righ)
- Fire for all brakes (I'm a pacific man :lol: )

BTW i'm very happy with it
A good pilot is an alive pilot. -> Building the On This Day in Aviation History <-
User avatar
F-VEBR
 
Posts: 445
Joined: Thu Dec 28, 2006 7:56 am
Location: LFMD
Callsign: F-VEBR
Version: 2_8_0_5
OS: Vista

Re: Updated Joystick Configuration

Postby DutchPilotMitchell » Tue Mar 01, 2011 8:44 pm

Hey, i am going to buy this one, because it is very cheap 30 euros and it looks nice :P And i like that new config. you have made. But where can i change this? ( I have a Mac)
Proud to be Dutch.
User avatar
DutchPilotMitchell
 
Posts: 717
Joined: Tue Feb 15, 2011 9:10 pm
Location: The Netherlands
Callsign: mitchel
Version: 22
OS: Mac OS X

Re: Updated Joystick Configuration

Postby SH1973 » Sun Jul 10, 2011 4:45 pm

Where can I find the exhaustive reference of the nasal control properties for the buttons... There are explanations everywhere about how to set things up... put I haven't found the list of available properties...
SH1973
 
Posts: 1
Joined: Sun Jul 10, 2011 4:18 pm

Re: Updated Joystick Configuration

Postby Johan G » Sun Jul 10, 2011 5:14 pm

They're well hidden. :wink: You can find them in your installation directory: $FGROOT/data/Docs.

For the joystick configuration I would recommend that you not only look into README.joystick.html, but also some of the others. Most important is probably README.commands.

There is also an article in the FlightGear Wiki.

Of course, do have a look at the joystick configuration files in $FGROOT/data/Input/Joysticks to see what readily made ones look like. :wink:
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 6094
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest