Board index FlightGear Support Hardware

FAQs: customizing joystick controls; XP/Vista joystick issue

Joysticks, pedals, monitors.

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby redneck » Wed Mar 04, 2009 5:31 am

MD-Terp wrote:For joysticks that have no rudder control (twist axis), I've seen (a) a binding which automatically changes the left/right stick movement to control the rudder instead of the ailerons when on the ground, as well as (b) a binding that allowed for "auto-coordination" of aileron and rudder controls ONLY while a certain button was depressed (again, to improve ground steering).

For joysticks which have the rudder on twist but don't have the ability to command left- and right-hand wheelbrakes independently (i.e. the wheelbrakes are only available in an on-off mode), I personally have a script with a formula so that when I am simultaneously braking and steering with rudder, the wheelbrakes are applied differentially to assist in ground steering.


Would it be possible to bind all of this to one button on a joystick with no twist axis? The idea being that, by holding the trigger (button 0) auto-coordination turns off, left/right movement is converted to rudder control, and wheel brakes are applied differentially while steering with the rudder simultaneously. Of course, that idea also includes that those features revert back to default values when I release the trigger as well. I just think that would be amazing! 8)

Edit: Actually, if I could control the rudder independently without having to turn off auto-coordination, that would be fine too. I really gotta learn how to code this stuff, b/c getting a B-2 to turn around and get into takeoff position at the end of a runway is next to impossible right now, unless I were to somehow spin a 180 at touchdown and cleverly manipulate the brakes, taxiing backwards down the runway. I would think that's possible, being that the first time I landed the B-2 at KJFK 13R, I spun out of control and just happened to find myself parked at a terminal once I managed to stop.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby lqiyun » Thu Mar 12, 2009 12:27 pm

Hi, all!

Recently, I'm trying to persuade my father to buy me a joystick for Flightgear... But, first, I need to know which joysticks are compatible or NOT compatible with flightgear so that I won't buy the wrong one.. Someone please give me some advice on which joysticks to choose, thanks! :)

cheers,
and thanks,
qiyun :D
QiYun

Flightgear Callsign: Old-Man

Fight on and fly on to the last drop of blood and the last drop of fuel, to the last beat of the heart.
— Baron Manfred von Richthofen.
User avatar
lqiyun
 
Posts: 250
Joined: Fri Nov 14, 2008 4:09 pm
Location: Singapore

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby RatOmeter » Fri Mar 13, 2009 1:48 pm

MD-Terp wrote:
2. The problem, as "caused" by Windows XP/Vista.
It seems as if Windows XP and/or Vista tend to report all joystick names as "Microsoft PC-Joystick Driver" regardless of what they are. This may or may not hold true if the user has taken the time to install the manufacturer's specific driver for that device; all feedback we have received so far seems to indicate that Windows defaults to a "generic" MS driver regardless, but your mileage may vary.


A patch has been accepted by the plib project that corrects this behavior, so it should not be a problem in the next release (plib 1.8.6?) or if you update your plib from SVN now.
RatOmeter
 
Posts: 30
Joined: Tue Jan 30, 2007 7:38 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby MAKG » Fri Mar 13, 2009 9:07 pm

lqiyun wrote:Hi, all!

Recently, I'm trying to persuade my father to buy me a joystick for Flightgear... But, first, I need to know which joysticks are compatible or NOT compatible with flightgear so that I won't buy the wrong one.. Someone please give me some advice on which joysticks to choose, thanks! :)

cheers,
and thanks,
qiyun :D


I can't give you a complete list, but I've tried out the Saitek ST290. It's CHEAP ($30) and it works fine, out of the box, with no configuration. But if you feel like messing with scripts, quite a few enhancements have been posted to this board.

I also have a Saitek Cyborg Evo, which is even cheaper ($18), but requires external power and occasionally gets out of center (requiring a recenter -- this sucks when you're in the air). And the force feedback doesn't work with FlightGear.
MAKG
 
Posts: 1156
Joined: Sun Oct 19, 2008 6:11 pm
Location: California Central Coast

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby redneck » Fri Mar 13, 2009 9:13 pm

I use a Saitek ST90, which is even cheaper (~$10). I don't think it's in the list, but all of the buttons are mapped by the default setting properly, and it does not require external power or recentering. Only three buttons and three axis, though.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby screwbottle » Thu Mar 19, 2009 5:20 pm

Greetings to you all

I need some advice please, on where I can post my updated profiles, and have a XML expert look through the code. And hopefully be included in the next update of FlightGear.

I own the Saitek X52 control system, no foot pedals, and a very old set of X35 and X45's. I know these sticks backwards in their programming and have even successfully written profiles for them in Windows XP, for various other SIMS (car, boat, aircraft etc). I have been using FlightGear since version 0.9.8, now with 1.9.1, and was never really very happy with the way the mentioned sticks were handled. I started to teach myself XML coding recently (having been in IT since 1976, more focused on hardware but did necessary programming as well) and have finally got to a point where I feel comfortable with it, although still LOTS to learn, so decided to tackle the task. I have used the existing X52 and X52 Pro profiles I found in 1.9.1, and have completely fixed, removed and updated the functions for the X52 stick and throttle. I even figured out how to get the twist grip rudder working. I have also added extensible instructions of the functions in the actual XML profile, so anyone else wanting to "tinker" will understand what is where etc.

I found a lot of functions and errors carried over, and a duplication of the flaps control, by the looks of things, from the X45 profile. I have managed to borrow a set of X52 Pro's as well, to match the axis and buttons, which are almost identical to the X52, so this is my next task, My only problem, I have limited time with them as they are saleable items, albeit they will be sold as used. I don't yet have the spare cash to purchase them. But testing with my current X52 profiles seems to make the Pro kit work identically, so I am on the right track. I have even prepared a document of all of the functions of the axis and buttons to stick up next to your screen as a reminder of the actions.

One thing I am stuck with, is getting the throttle wheel and click (pushing in on the wheel) of both X52 and Pro to be mapped. This lies on the throttle at the rear, under the index finger. There is also a hat next to it. I've noticed in many SIMS that this action is ignored. So maybe someone can help. I just need to know what code to use to map the action of the wheel and the click. I will work out a SIM function for them.

So as to my request at the beginning of this post, can you advise on how and where to upload the profile (including the document), and if found to be good, allow it to be freely downloaded by any one else who has this kit.

Regards
Screwbottle
W7 Ult. x64 / Ubuntu 14.04, Core i7 4770K 3.5GHZ, Asus Z87-Plus mobo, HD 7850 2GB graphics, 8GB DDR3 1600MHZ
500GB SATAIII (Boot), 2TB SATAIII (Data), 1TB SATAIII (Linux), 18x SATA DVDRW * 2 Opticals, 750W PSU
Zalman CNPS10X Sharks Fin Cooler
screwbottle
 
Posts: 25
Joined: Wed Feb 18, 2009 5:41 pm
Callsign: Aceman / Screwbottle
Version: 3.0.0
OS: Windows, Linux

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby sambar » Sat Mar 28, 2009 6:58 am

Why FlightGear 1.9.0 and later is omit js_demo.exe ?

I was that download from http://flightgear.jpn.org/modules/d3dow ... d=6&lid=20
Regarts.
#Sorry,bad English!
JA26FB(new callsign) , sambar(old callsign)
sambar
 
Posts: 39
Joined: Sun Feb 17, 2008 9:48 am
Location: Okayama, Japan
Callsign: JA26FB
Version: Git_Next
OS: Ubuntu(Trusty,amd64)

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby Tempest3 » Sat Apr 04, 2009 8:31 pm

I have a Logitech WingMan Force USB and just managed to get the trigger set up thanks to the Wiki article. My question is why doesn't the hat view switch work. The .xml file says it is configured, and I know that the switch works from other simulators I use it with. What is the code for operating a 2 axis hat switch?
Tempest3
 
Posts: 6
Joined: Thu Oct 23, 2008 10:51 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby MD-Terp » Wed May 27, 2009 3:25 pm

Tempest3 wrote:I have a Logitech WingMan Force USB and just managed to get the trigger set up thanks to the Wiki article. My question is why doesn't the hat view switch work. The .xml file says it is configured, and I know that the switch works from other simulators I use it with. What is the code for operating a 2 axis hat switch?

The bindings I've seen for these all seem to operate using the XML tags <high> and <low>. However, they seem to output values of 0 (centered), 1.0 (up or right), and -1.0 (down or left), so assigning these values to control surfaces (with scaling factors as appropriate, or whatever) would probably work, too.

Look through one of the existing binding files for any that include a <high> </high> and <low> </low> tag set for some examples. There are some scattered around the forum, too. And please feel free to come back if you need some additional, more specific advice.
Cheers,
-Rob.

"Retired" from FlightGear involvement as of July 2010.
viewtopic.php?f=3&t=8809
User avatar
MD-Terp
 
Posts: 2420
Joined: Wed Jan 23, 2008 6:37 am
Location: Baltimore, Maryland, USA
Callsign: N531MD, AVA0025

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby aok1 » Sat May 30, 2009 9:02 pm

Hi,

I have some joystick buttons bound for controls in prop planes, e.g. controls.adjMixture() and controls.adjPropeller().
I want to have these buttons available for other controls when I fly a jet, since they are useless then. I am looking for what to check in the property tree -other than the plane itself- to find out if prop or jet. Any suggestions?

edit: also I am wondering about "autopilot/target-tracking/enable" if this is set to 1, all the target-markers appear, but it seems they cannot be turned off after that, then it doesn't seem to matter if it is 1 or 0. Can this be done while playing?

Thanks.
Watch my videos and look at screenhots if you're into that sort of thing :)
aok1
 
Posts: 105
Joined: Sun Apr 19, 2009 10:02 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby yourgod » Fri Jun 12, 2009 3:48 pm

I'm having some issues configuring my joystick. I have a Logitech Extreme 3d, but the included xml for it has limited functions mapped to the buttons and the mapping that it has for the buttons is completely illogical to me. I tried creating a new xml file using fgjs, and forced fgfs to use that xml via joysticks.xml, but anytime I try to start fgfs using that generated xml file, it seg faults.

Any ideas? I've included the provided xml for this stick below, and the xml generated by fgjs after that.

Included xml:
Code: Select all
<?xml version="1.0" ?>
<!-- Maintainer: Frederic Bouvier -->
<!--
************************************************************************
* Bindings for Logitech WingMan Extreme Digital 3D (USB) joystick.
*
*
* Axis 0: ailerons
* Axis 1: elevator
* Axis 2(windows),3(unix,mac) (slider): throttle
* Axis 3(windows),2(unix,mac) (twist): rudder
* Axes 6&7(windows), 4&5(unix,mac) (hat): view direction
*
* Button 0: all brakes
* Button 1: elevator trim up
* Button 2: elevator trim down
* Button 3: mixture richer
* Button 4: mixture leaner
* Button 5: left brake only
* Button 6: right brake only
************************************************************************
$Id: wingman-extreme-digital-3d.xml,v 1.13 2006/03/01 18:17:26 mfranz Exp $
-->

<PropertyList>

 <name>Logitech Inc. WingMan Extreme Digital 3D</name>
<!-- <name>Logitech Logitech Extreme 3D</name> -->
 <name>Logitech WingMan Extreme Digital 3D (USB)</name>

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

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

 <axis>
  <desc>Throttle</desc>
  <number>
   <unix>3</unix>
   <mac>3</mac>
   <windows>2</windows>
  </number>
  <binding>
   <command>nasal</command>
   <script>controls.throttleAxis()</script>
  </binding>
 </axis>

 <axis>
  <desc>Rudder</desc>
  <number>
   <unix>2</unix>
   <mac>2</mac>
   <windows>3</windows>
  </number>
  <binding>
   <command>property-scale</command>
   <property>/controls/flight/rudder</property>
   <factor type="double">1.0</factor>
  </binding>
 </axis>

 <axis n="6">
  <desc>View Direction</desc>
  <number>
   <unix>4</unix>
   <mac>4</mac>
   <windows>6</windows>
  </number>
  <low>
   <repeatable>true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/sim/current-view/goal-heading-offset-deg</property>
    <step type="double">1.0</step>
   </binding>
  </low>
  <high>
   <repeatable>true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/sim/current-view/goal-heading-offset-deg</property>
    <step type="double">-1.0</step>
   </binding>
  </high>
 </axis>

 <axis>
  <desc>View Elevation</desc>
  <number>
   <unix>5</unix>
   <mac>5</mac>
   <windows>7</windows>
  </number>
  <low>
   <repeatable>true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/sim/current-view/goal-pitch-offset-deg</property>
    <step type="double">1.0</step>
   </binding>
  </low>
  <high>
   <repeatable>true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/sim/current-view/goal-pitch-offset-deg</property>
    <step type="double">-1.0</step>
   </binding>
  </high>
 </axis>

 <button>
  <desc>Brakes</desc>
  <number>
   <unix>0</unix>
   <mac>0</mac>
   <windows>0</windows>
  </number>
  <binding>
   <command>nasal</command>
   <script>controls.applyBrakes(1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.applyBrakes(0)</script>
   </binding>
  </mod-up>
 </button>

 <button>
  <desc>Elevator trim up</desc>
  <number>
   <unix>1</unix>
   <mac>1</mac>
   <windows>1</windows>
  </number>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>nasal</command>
   <script>controls.elevatorTrim(1)</script>
  </binding>
 </button>

 <button>
  <desc>Elevator trim down</desc>
  <number>
   <unix>2</unix>
   <mac>2</mac>
   <windows>2</windows>
  </number>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>nasal</command>
   <script>controls.elevatorTrim(-1)</script>
  </binding>
 </button>

 <button>
  <desc>Flaps down</desc>
  <number>
   <unix>3</unix>
   <mac>3</mac>
   <windows>3</windows>
  </number>
  <repeatable>true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/engines/engine[0]/mixture</property>
   <step>0.01</step>
  </binding>
  <binding>
   <command>property-adjust</command>
   <property>/controls/engines/engine[1]/mixture</property>
   <step>0.01</step>
  </binding>
 </button>

 <button>
  <desc>Flaps up</desc>
  <number>
   <unix>4</unix>
   <mac>4</mac>
   <windows>4</windows>
  </number>
  <repeatable>true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/engines/engine[0]/mixture</property>
   <step>-0.01</step>
  </binding>
  <binding>
   <command>property-adjust</command>
   <property>/controls/engines/engine[1]/mixture</property>
   <step>-0.01</step>
  </binding>
 </button>

 <button>
  <desc>Left brake</desc>
  <number>
   <unix>5</unix>
   <mac>5</mac>
   <windows>5</windows>
  </number>
  <binding>
   <command>nasal</command>
   <script>controls.applyBrakes(1, -1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.applyBrakes(0, -1)</script>
   </binding>
  </mod-up>
 </button>

 <button>
  <desc>Right brake</desc>
  <number>
   <unix>6</unix>
   <mac>6</mac>
   <windows>6</windows>
  </number>
  <binding>
   <command>nasal</command>
   <script>controls.applyBrakes(1, 1)</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>controls.applyBrakes(0, 1)</script>
   </binding>
  </mod-up>
 </button>

</PropertyList>


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

<PropertyList>
  <axis>
    <desc>Aileron</desc>
    <direction>right</direction>
    <binding>
      <command>property-scale</command>
      <property>/controls/flight/aileron</property>
      <offset type="double">0</offset>
      <factor type="double">1</factor>
      <power type="int">1</power>
    </binding>
    <dead-band type="double">-0.03118991666</dead-band>
  </axis>
  <axis n="1">
    <desc>Elevator</desc>
    <direction>down/forward</direction>
    <binding>
      <command>property-scale</command>
      <property>/controls/flight/elevator</property>
      <factor type="double">-1</factor>
      <power type="int">1</power>
    </binding>
    <dead-band type="double">0.03118991666</dead-band>
  </axis>
  <axis n="2">
    <desc>Rudder</desc>
    <direction>right</direction>
    <binding>
      <command>property-scale</command>
      <property>/controls/flight/rudder</property>
      <factor type="double">-1</factor>
      <power type="int">1</power>
    </binding>
    <dead-band type="double">-0.02063051239</dead-band>
  </axis>
  <axis n="3">
    <desc>Throttle</desc>
    <direction>forward</direction>
    <binding>
      <command>nasal</command>
      <script>controls.throttleAxis()</script>
      <factor type="double">-1</factor>
    </binding>
    <dead-band type="double">0</dead-band>
  </axis>
  <axis n="4">
    <desc>View Direction</desc>
    <direction>left</direction>
    <low>
      <repeatable>true</repeatable>
      <binding>
        <command>nasal</command>
        <script>view.panViewDir(1)</script>
      </binding>
    </low>
    <high>
      <repeatable>true</repeatable>
      <binding>
        <command>nasal</command>
        <script>view.panViewDir(-1)</script>
      </binding>
    </high>
    <dead-band type="double">0</dead-band>
    <binding>
      <factor type="double">-1</factor>
    </binding>
  </axis>
  <axis n="5">
    <desc>View Elevation</desc>
    <direction>upward</direction>
    <low>
      <repeatable>true</repeatable>
      <binding>
        <command>nasal</command>
        <script>view.panViewPitch(1)</script>
      </binding>
    </low>
    <high>
      <repeatable>true</repeatable>
      <binding>
        <command>nasal</command>
        <script>view.panViewPitch(-1)</script>
      </binding>
    </high>
    <dead-band type="double">0</dead-band>
    <binding>
      <factor type="double">-1</factor>
    </binding>
  </axis>
  <button n="1">
    <desc>View Cycle</desc>
    <repeatable>false</repeatable>
    <binding>
      <command>nasal</command>
      <script>view.stepView(1)</script>
    </binding>
  </button>
  <button>
    <desc>Brakes</desc>
    <binding>
      <command>nasal</command>
      <script>controls.applyBrakes(1)</script>
    </binding>
    <mod-up>
      <binding>
        <command>nasal</command>
        <script>controls.applyBrakes(0)</script>
      </binding>
    </mod-up>
  </button>
  <button n="2">
    <desc>Left Brake</desc>
    <binding>
      <command>nasal</command>
      <script>controls.applyBrakes(1, -1)</script>
    </binding>
    <mod-up>
      <binding>
        <command>nasal</command>
        <script>controls.applyBrakes(0, -1)</script>
      </binding>
    </mod-up>
  </button>
  <button n="3">
    <desc>Right Brake</desc>
    <binding>
      <command>nasal</command>
      <script>controls.applyBrakes(1, 1)</script>
    </binding>
    <mod-up>
      <binding>
        <command>nasal</command>
        <script>controls.applyBrakes(0, 1)</script>
      </binding>
    </mod-up>
  </button>
  <button n="9">
    <desc>Flaps Up</desc>
    <repeatable>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>Flaps Down</desc>
    <repeatable>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="6">
    <desc>Elevator Trim Forward</desc>
    <repeatable>true</repeatable>
    <binding>
      <command>nasal</command>
      <script>controls.elevatorTrim(0.75)</script>
    </binding>
  </button>
  <button n="7">
    <desc>Elevator Trim Backward</desc>
    <repeatable>true</repeatable>
    <binding>
      <command>nasal</command>
      <script>controls.elevatorTrim(-0.75)</script>
    </binding>
  </button>
  <button n="10">
    <desc>Landing Gear Toggle</desc>
    <repeatable>false</repeatable>
    <binding>
      <command>nasal</command>
      <script>controls.gearToggle()</script>
    </binding>
  </button>
  <name type="string">Logitech Logitech Extreme 3D</name>
</PropertyList>


Is there any place that lists all the available property values, nasal controller objects and methods, and all the valid tags the xml parser understands? I've looked through the wiki and it has a very small sample it seems.

I haven't dug into the code that much yet but I'm really hoping it's not required for one to jump into a sea of nasal scripts just to figure out how to configure a joystick.

Thanks!
Callsign: YOURGOD, (YOURGO if you only recognize 6 characters)
TransGear Airways site: http://transgear.treborlogic.com/
FG related projects:
Planes: Douglas DC-8-73
Code: Hurricane simulation weather enhancement
User avatar
yourgod
 
Posts: 1016
Joined: Wed May 13, 2009 7:09 pm
Callsign: YOURGOD

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby AndersG » Fri Jun 12, 2009 4:42 pm

yourgod wrote:I'm having some issues configuring my joystick. I have a Logitech Extreme 3d, but the included xml for it has limited functions mapped to the buttons and the mapping that it has for the buttons is completely illogical to me. I tried creating a new xml file using fgjs, and forced fgfs to use that xml via joysticks.xml, but anytime I try to start fgfs using that generated xml file, it seg faults.


If it is just the buttons you want to change I think it'd be easier to start from the existing file and change it.
Look in other joystick configs to see how they map the controls you want mapped to buttons.

/Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2414
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby yourgod » Fri Jun 12, 2009 4:43 pm

well, "easier" would be if fgjs worked :cry:
Callsign: YOURGOD, (YOURGO if you only recognize 6 characters)
TransGear Airways site: http://transgear.treborlogic.com/
FG related projects:
Planes: Douglas DC-8-73
Code: Hurricane simulation weather enhancement
User avatar
yourgod
 
Posts: 1016
Joined: Wed May 13, 2009 7:09 pm
Callsign: YOURGOD

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby MD-Terp » Mon Jun 15, 2009 5:19 am

aok1 wrote:I am looking for what to check in the property tree -other than the plane itself- to find out if prop or jet. Any suggestions?

Umm, actually, no! But a stick config that adjusts itself automatically to what type of plane you're flying? Interesting idea! If anyone has any ideas on what engine properties we can test to determine engine type, please let us know!
Cheers,
-Rob.

"Retired" from FlightGear involvement as of July 2010.
viewtopic.php?f=3&t=8809
User avatar
MD-Terp
 
Posts: 2420
Joined: Wed Jan 23, 2008 6:37 am
Location: Baltimore, Maryland, USA
Callsign: N531MD, AVA0025

Re: FAQs: customizing joystick controls; XP/Vista joystick issue

Postby MD-Terp » Mon Jun 15, 2009 5:30 am

yourgod wrote:I'm having some issues configuring my joystick. I have a Logitech Extreme 3d, but the included xml for it has limited functions mapped to the buttons and the mapping that it has for the buttons is completely illogical to me.

Yeah, me too. Here's my current setup, which I love. Lots of buttons, many have multi-functionality... use and enjoy, or let me know how I can tweak it for you.

The hat controls rudder and elevator trim
The upper stick-top buttons control left-right view
The lower left stick-top button is a "glance up", useful with the view-left for lining up that turn from left base to final
The lower right stick-top button is a "glance-down" for instruments below the default view; also centers view
The thumb button coordinates braking with rudder input
The trigger is your FGCOM push-to-talk

On the base... think "F", "G", "H"
The forward two buttons are F for Flaps (outer extends, inner retracts)
The middle two buttons are G for Gear (outer extends, inner retracts)
The rear two buttons are H for Hook (everyone say it with me now...)

Also, the rear outer deploys the hook IF YOU ARE AIRBORNE. If you're on the ground, it deploys thrust reversers instead. (I've made that binding compatible with as many aircraft as possible, but some use an odd property for that, so it might not work in ALL aircraft.) The inner button retracts both the hook and/or reversers, whichever are deployed, regardless of where you are.

EDIT: OH! I forgot, the Gear buttons are multi-function, too. You can only lower/raise them if you're airborne. Thank goodness! If you're on the ground, these control your parking brake instead.

Try them on for size and let me know what you think.
Code: Select all
<?xml version="1.0" ?>

<!--
************************************************************************
* le3dp-rmsjr.xml : version 1.1, January 15th, 2009
* Modified Bindings for Logitech Extreme Digital 3D Pro joystick.
*
* Axis 0           : ailerons
* Axis 1           : elevator
* Axis 2 (twist)   : rudder
* Axis 3 (slider)  : throttle
* Axis 4 (hat l/r) : rudder trim
* Axis 5 (hat u/d) : elevator trim
*
* Buttons according to the numbers printed on the joystick:
* Button 1  : push-to-talk for use with FGCOM
* Button 2  : spoilers, airbrakes, wheelbrakes (automatically applies
*             differential wheel braking based on rudder position)
* Button 3  : glance up   (+30deg) while button held
* Button 4  : glance down (-30deg) while button held, and centers view
* Button 5  : view -30deg left
* Button 6  : view +30deg right
* Button 7  : flaps deploy/down/out/extend
* Button 8  : flaps stow/up/in/retract
* Button 9  : gear down/extend          (if airborne)
*             set parking brake         (if stopped on ground)
* Button 10 : gear up/retract/in        (if airborne)
*             release parking brake     (if on ground)
* Button 11 : arrestor hook down/extend (if airborne)
*             deploy/open reversers     (if on ground)
* Button 12 : arrestor hook up/retract, retract reversers
*
* Based on original extreme-3d-pro.xml by M. Franz
* Modified and Extended January 2009 by Rob Shearman, Jr. ("MD-Terp")
************************************************************************
-->

<PropertyList>

<name>Logitech Extreme Digital 3D Pro</name>
<name>Logitech Logitech Extreme 3D Pro</name>
<name>Logitech Extreme 3D Pro</name>
<name>Logitech Extreme 3D Pro USB</name>
<name>Logitech  Extreme  3D  Pro USB</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>
<desc>Rudder</desc>
<number>
<unix>2</unix>
<windows>3</windows>
</number>
<dead-band type="double">0.12</dead-band>
<binding>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<factor type="double">1.0</factor>
</binding>
</axis>

<axis>
<desc>Throttle</desc>
<number>
<unix>3</unix>
<windows>2</windows>
</number>
<binding>
<command>nasal</command>
<script>controls.throttleAxis()</script>
</binding>
</axis>

<axis>
<number>
<unix>4</unix>
<windows>6</windows>
</number>
<desc>Rudder trim</desc>
<low>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
<script>controls.rudderTrim(-1)</script>
</binding>
</low>
<high>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
<script>controls.rudderTrim(1)</script>
</binding>
</high>
</axis>

<axis>
<number>
<unix>5</unix>
<windows>7</windows>
</number>
<desc>Elevator trim</desc>
<low>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
<script>controls.elevatorTrim(-1)</script>
</binding>
</low>
<high>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
<script>controls.elevatorTrim(1)</script>
</binding>
</high>
</axis>

<button n="0">
<desc>PTT - Push To Talk</desc>
<binding>
<command>nasal</command>
<script>controls.ptt(1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.ptt(0)</script>
</binding>
</mod-up>
</button>

<button n="1">
<desc>Brakes</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/controls/flight/spoilers",1);
setprop("/controls/flight/speedbrake",1);
var rp = getprop("/controls/flight/rudder");
if (rp > 0)
  {
    setprop("/controls/gear/brake-left",1-rp);
    setprop("/controls/gear/brake-right",1)
  }
else
  {
    setprop("/controls/gear/brake-left",1);
    setprop("/controls/gear/brake-right",1+rp)
  }
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
controls.applyBrakes(0);
setprop("/controls/flight/spoilers", 0);
setprop("/controls/flight/speedbrake",0)
</script>
</binding>
</mod-up>
</button>

<button n="2">
<desc>Glance Up</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/pitch-offset-deg")+30)
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/pitch-offset-deg")-30)
</script>
</binding>
</mod-up>
</button>

<button n="3">
<desc>Glance Down and Center</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/pitch-offset-deg")-30);
setprop("/sim/current-view/heading-offset-deg", 0)
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/pitch-offset-deg", getprop("/sim/current-view/pitch-offset-deg")+30)
</script>
</binding>
</mod-up>
</button>

<button n="4">
<desc>Look Left</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/heading-offset-deg")+30)
</script>
</binding>
</button>

<button n="5">
<desc>Look Right</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/sim/current-view/heading-offset-deg", getprop("/sim/current-view/heading-offset-deg")-30)
</script>
</binding>
</button>

<button n="6">
<desc>Flaps down</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="7">
<desc>Flaps up</desc>
<repeatable>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>Gear down or set parking brake</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
if (getprop("/position/altitude-agl-ft") > 100)
  { controls.gearDown(1) }
elsif (50 > getprop("/velocities/groundspeed-kt"))
  { setprop("/controls/gear/brake-parking", 1) }
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.gearDown(0)</script>
</binding>
</mod-up>
</button>

<button n="9">
<desc>Gear up or release parking brake</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
if (getprop("/position/altitude-agl-ft") > 100)
  { controls.gearDown(-1) }
else
  { setprop("/controls/gear/brake-parking", 0) }
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.gearDown(0)</script>
</binding>
</mod-up>
</button>

<button n="10">
<desc>Hook down, or deploy reversers</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
if (getprop("/position/altitude-agl-ft") > 100)
  {
    setprop("/controls/gear/tailhook",1);
    setprop("/fdm/jsbsim/systems/hook/tailhook-cmd-norm",1)
  }
else
  {
    setprop("/controls/engines/engine[0]/reverser", 1);
    setprop("/controls/engines/engine[1]/reverser", 1);
    setprop("/controls/engines/engine[2]/reverser", 1);
    setprop("/controls/engines/engine[3]/reverser", 1);
    setprop("/fdm/jsbsim/systems/reverser/command", 1);
  }
</script>
</binding>
</button>

<button n="11">
<desc>Hook up, retract reversers</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/controls/gear/tailhook",0);
setprop("/fdm/jsbsim/systems/hook/tailhook-cmd-norm",0);
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
setprop("/controls/engines/engine[2]/reverser", 0);
setprop("/controls/engines/engine[3]/reverser", 0);
setprop("/fdm/jsbsim/systems/reverser/command", 0);
</script>
</binding>
</button>

</PropertyList>
Cheers,
-Rob.

"Retired" from FlightGear involvement as of July 2010.
viewtopic.php?f=3&t=8809
User avatar
MD-Terp
 
Posts: 2420
Joined: Wed Jan 23, 2008 6:37 am
Location: Baltimore, Maryland, USA
Callsign: N531MD, AVA0025

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests