Board index FlightGear Support Hardware

Joystick xml codes Library project - open for contributions  Topic is solved

Joysticks, pedals, monitors.

Re: Joystick xml codes Library project - open for contributi

Postby shawn » Sat Jul 27, 2013 9:00 am

previous poster's message contains spam but +1 for relevant content effort.
shawn
 
Posts: 22
Joined: Mon Feb 11, 2013 1:30 pm
Location: Singapore
Callsign: shawn / SFshawn
Version: 2.10
OS: Win 7 x64

Re: Joystick xml codes Library project - open for contributi

Postby Kumcha » Sun Oct 27, 2013 10:41 am

Where can i install drivers for joysticks?
Kumcha
 
Posts: 5
Joined: Tue Oct 22, 2013 8:53 am
Callsign: Kumcha
OS: Mac OS X

Re: Joystick xml codes Library project - open for contributi

Postby Kumcha » Sun Oct 27, 2013 10:43 am

Where Do i put theses files
Kumcha
 
Posts: 5
Joined: Tue Oct 22, 2013 8:53 am
Callsign: Kumcha
OS: Mac OS X

Re: Joystick xml codes Library project - open for contributi

Postby Johan G » Sun Oct 27, 2013 12:01 pm

Look around in $FG_DATA/Input/Joystick/.., $FG_DATA being the data folder in your FlightGear installation. They should be pasted somewhere there depending on what joystick manufacturer and model.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6625
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Joystick xml codes Library project - open for contributi

Postby CareyParks » Fri Feb 21, 2014 6:23 pm

THANK YOU... Thank You...thank you!

Contains exactly what I was looking for over the course of a week. Bookmarked!!

Carey
Working on
Aircraft: RV-7
Airports: Page Field, Ft Myers, FL
CareyParks
 
Posts: 63
Joined: Mon Jan 27, 2014 8:52 pm

DragonRise Inc. Generic USB Joystick

Postby FlyingArmchair » Sun Jul 13, 2014 5:34 pm

This pad comes under different brands and names, looks like this :
http://www.google.com/imgres?imgurl=http%3A%2F%2Fi.stack.imgur.com%2FrAIU2.png&imgrefurl=http%3A%2F%2Faskubuntu.com%2Fquestions%2F32031%2Fhow-do-i-configure-a-joystick-or-gamepad&h=462&w=624&tbnid=8zW5vXVJVS5r7M%3A&zoom=1&docid=tv-P1Si7s-CjcM&ei=ALDCU7qDK6ad0QXPpYH4Ag&tbm=isch&ved=0CCYQMygIMAg&iact=rc&uact=3&dur=2300&page=1&start=0&ndsp=30

In France comes with the "Freebox" set top box.

Not my script, but a good one, methink :
https://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg39957.html


I've tried to customize it to better suit what I need now (General aviation, one motor, no weapons obv.). Specifically I'd like a stepped throttle, easilly reachable flaps and breaks ... I'm having a hard time with that. I wouldn't go as far as saying that the joystick configuration module is broken in FG, but it certainly isn't optimal.

Enjoy anyway, and don't forget to fly ;-)

BTW, the exact name, including weird trailing spaces, is :
<name>DragonRise Inc. Generic USB Joystick </name>
Last edited by Gijs on Sun Jul 13, 2014 6:01 pm, edited 1 time in total.
Reason: Please edit your post if you forgot to add something
FlyingArmchair
 
Posts: 1
Joined: Sun Jul 13, 2014 5:10 pm

Re: Joystick xml codes Library project - open for contributi

Postby Ouacaze » Tue Aug 05, 2014 9:55 pm

Hi,

I've just copied the "Microsoft SideWinder Precision Racing Wheel" xml file and adapted it to use with the Logitech G25 Racing Wheel.
It only maps the clutch and throttle pedal as the rudder, but it works well.

NB: I left the tags for Win and OSX as they were for the microsoft, but I only tested this on Linux. So if someone could try this under Windows and OSX, and maybe try it with a G27, it would be great !

Here it is "g25-racing-wheel.xml" :

Code: Select all
<?xml version="1.0"?>
<!--
************************************************************************
* Bindings for Logitech G25 Racing Wheel.
* Axis 1:                        rudder
* Axis 2:                        rudder
************************************************************************
$Id$
-->

<PropertyList>
  <name>G25 Racing Wheel</name>

  <axis n="1">
    <desc>Rudder Right</desc>
    <number>
      <unix>1</unix>
      <mac>1</mac>
      <windows>2</windows>
    </number>
    <binding>
      <command>property-scale</command>
      <property>/controls/flight/rudder</property>
      <factor type="double">-0.5</factor>
      <offset type="double">-1.0</offset>
      <squared type="bool">true</squared>
    </binding>
  </axis>

  <axis n="2">
    <desc>Rudder Left</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">0.5</factor>
      <offset type="double">-1.0</offset>
      <squared type="bool">true</squared>
    </binding>
  </axis>
</PropertyList>
Ouacaze
 
Posts: 23
Joined: Mon Aug 03, 2009 8:03 pm
Location: Toulouse

Re: Joystick xml codes Library project - open for contributi

Postby Andino » Sat Sep 12, 2015 8:46 am

Image

I have a Thrustmaster T-Flight Stick X, and I have usually had to add my own .xml, because Flightgear does not recognize it.

It is a very simple file. I can share it. It is here:

https://andinogonthaeler.wordpress.com/downloads-2/
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Joystick xml codes Library project - open for contributi

Postby hamzaalloush » Sat Sep 12, 2015 9:10 am

Andino,

looks like you don't have the latest version of Flight Gear if that Joystick is not recognized,

because currently T-Flight-Stick-X.xml reads like this in FG 3.6:

Code: Select all
<PropertyList>
 <name type="string">T.Flight Stick X</name>
 <name type="string">Thrustmaster T.Flight Stick X</name>
...
</PropertyList>


whereas in FG 3.4 and previous, still reads:

Code: Select all
<PropertyList>
 <name type="string">T.Flight Stick X</name>
...
</PropertyList>
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: Joystick xml codes Library project - open for contributi

Postby Andino » Sat Sep 12, 2015 12:07 pm

Yes, i have not tested it with 3.6 yet.
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Joystick xml codes Library project - open for contributi

Postby massima » Sat Sep 12, 2015 6:59 pm

I use the TM hotas-x (stick+throttle), it is detected by FG and it perfectly works under Linux.
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: Joystick xml codes Library project - open for contributi

Postby Andino » Sat Sep 19, 2015 3:13 pm

I have tested the last version of FG (3.6), and it works, although it does not has the flaps programmed.
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Joystick xml codes Library project - open for contributi

Postby N-SCOT » Sun Mar 13, 2016 7:01 pm

Not a contribution, but more of a request for a solution. I'm clawing my system back from some electric badness, and I cannot find an xml entry I've used for years. As best as I recall, it was to drop into the joystick.xml or whatevermyjoystickis.xml no more than 4 lines of code that essentially would operate the rudder in flight and the nose wheel steering on the ground.

I've dug through the forum for the past week now, but can't seem to elicit the correct search string to find it again. Does anyone know of what I speak?

Thx,

G
Gary Brown, aka N-SCOT
Favorite Aircraft: Military
Favorite FG activity: Livery generation
N-SCOT
 
Posts: 178
Joined: Sun Apr 19, 2009 3:17 pm
Location: Gainesville, Florida. Home of the "Fighting' Gators"!
Callsign: N-SCOT
Version: 2020.1.2
OS: OSX High Sierra

Re: Joystick xml codes Library project - open for contributi

Postby Johan G » Sun Mar 13, 2016 7:30 pm

It would probably be two bindings conditional on wow (weight on wheels). One binding operating the rudder if wow is false, one operating the nose wheel steering when wow is true.

I think you will find a wow property under /gear/gear[n].

Note that you could also add the binding to a a file with personal settings. See the wiki article section FlightGear configuration via XML#Adding your own settings (perm). That way you can keep your custom settings if you have a backup of that file.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6625
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Joystick xml codes Library project - open for contributi

Postby sim » Thu Mar 17, 2016 3:37 pm

Found this wow script which seems to ensure gear cannot be raised whilst plane is on the ground but gear can be raised once plane is in air. With modification may help your swap from rudder in air to nose steer on ground.
Seem to recall seeing similar wow script to only activate rudder buttons in air probably on a joystick with no twistgrip. So hunt for topics regarding joysticks with no twist axis. That might reveal the script you are looking for.

Code: Select all
<script>var wow = getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow");if (wow) { setprop("/controls/gear/gear-down", 1);} else {gearToggle = getprop("/controls/gear/gear-down"); if (gearToggle == 1) { controls.gearDown(-1); gui.popupTip("Gear up!"); } else { controls.gearDown(1); gui.popupTip("Gear down!");</script>


Have not tested this code which may or may not need working on!

Try googling getprop("/gear/gear[1]/wow") to see what else is out there!

Logitech Attack 3 joystick has interesting axis 0
Code: Select all
<axis n="0">
 <desc>Rudder on ground, aileron in flight</desc>
 <!-- Implemented on-ground taxi patch by Sebastain Marque -->
 <binding>
 <condition>
 <property>/gear/gear/wow</property>
 </condition>
 <command>property-scale</command>
 <property>/controls/flight/rudder</property>
 <squared type="bool">true</squared>
 </binding>
 <desc>Aileron</desc>
 <dead-band type="double">0.02</dead-band>
 <binding>
 <condition>
 <not>
 <property>/gear/gear/wow</property>
 </not>
 </condition>
 <command>property-scale</command>
 <property>/controls/flight/aileron</property>
 <offset type="double">0.0</offset>
 <factor type="double">1.0</factor>
 <tolerance type="double">0.0</tolerance>
 <squared type="bool">true</squared>
 <power type="double">2.0</power>
 </binding>
</axis>
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

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests