Input device: Difference between revisions

Jump to navigation Jump to search
25 bytes removed ,  24 November 2009
m
small style edits
No edit summary
m (small style edits)
Line 1: Line 1:
Could you imagine a pilot in his or her Cessna controlling the machine with a keyboard alone? For getting the proper feeling of flight you will need a joystick/yoke plus [[rudder]] pedals, right? However, the combination of numerous types of joysticks, flightsticks, yokes, pedals etc. the market with the several target operating systems, makes joystick support a nontrivial task in FlightGear.  
Could you imagine a pilot in his or her [[:Category:Cessna|Cessna]] controlling the machine with a keyboard alone? For getting the proper feeling of flight you will need a '''joystick/yoke''' plus [[rudder]] pedals, right? However, the combination of numerous types of joysticks, flightsticks, yokes, pedals etc. the market with the several target operating systems, makes joystick support a nontrivial task in [[FlightGear]].  


FlightGear has integrated joystick support, which automatically detects any joystick, yoke, or pedals attached. Just try it! If this does work for you, lean back and be happy! You can see what FlightGear has detected your joystick as by selecting Help -> Joystick Information from the menu.  
FlightGear has integrated joystick support, which automatically detects any joystick, yoke, or pedals attached. Just try it! If this does work for you, lean back and be happy! You can see what FlightGear has detected your joystick as by selecting Help -> Joystick Information from the menu.  
Line 151: Line 151:
Next, open QuickStick.xml with your favorite editor. Before we forget to change the joystick name, search for the line containing <name>. You should find the line  
Next, open QuickStick.xml with your favorite editor. Before we forget to change the joystick name, search for the line containing <name>. You should find the line  


'''<name>SAITEK CYBORG 3D USB</name>'''
<name>SAITEK CYBORG 3D USB</name>  


and change it to  
and change it to  


'''<name>QUICK STICK 3D USB</name>.'''
<name>QUICK STICK 3D USB</name>


This line illustrates a key feature of xml statements. They begin with a <tag> and end with a </tag>.  
This line illustrates a key feature of xml statements. They begin with a <tag> and end with a </tag>.  
Line 161: Line 161:
You can now compare your table to the comment table at the top of your file copy. Note that the comments tell us that the Saitek elevator was assigned to axis 1. Search for the string  
You can now compare your table to the comment table at the top of your file copy. Note that the comments tell us that the Saitek elevator was assigned to axis 1. Search for the string  


'''<axis n=~1~>'''
<axis n=~1~>  


and change this to  
and change this to  


'''<axis n=~0~>.'''
<axis n=~0~>


Next, note that the Saitek rudder was assigned to axis 2. Search for the string  
Next, note that the Saitek rudder was assigned to axis 2. Search for the string  


'''<axis n=~2~>'''
<axis n=~2~>  


and change this to  
and change this to  


'''<axis n=~1~>.'''
<axis n=~1~>  


Continue comparing your table with the comment table for the Saitek and changing the axis numbers and button numbers accordingly. Since QUICKSTICK USB and the Saitek have the same number of axes but different number of buttons, you must delete the buttons left over. Just remember to double check that you have a closing tag for each opening tag or you will get an error using the file.  
Continue comparing your table with the comment table for the Saitek and changing the axis numbers and button numbers accordingly. Since QUICKSTICK USB and the Saitek have the same number of axes but different number of buttons, you must delete the buttons left over. Just remember to double check that you have a closing tag for each opening tag or you will get an error using the file.  
Line 197: Line 197:
The first one concerns users of non-US Windows versions. As stated above, you can get the name of the joystick from the program js demo. If you have a non-US version of Windows and the joystick .xml files named above do not contain that special name, just add it on top of the appropriate file in the style of  
The first one concerns users of non-US Windows versions. As stated above, you can get the name of the joystick from the program js demo. If you have a non-US version of Windows and the joystick .xml files named above do not contain that special name, just add it on top of the appropriate file in the style of  


<name>Microsoft-PC-Joysticktreiber </name>  
<name>Microsoft-PC-Joysticktreiber </name>  


No new entry in the base joysticks.xml file is required.  
No new entry in the base joysticks.xml file is required.  
Line 210: Line 210:
For configuring your joystick using this approach, open a command shell (command prompt under windows, to be found under Start|All programs|Accessories). Change to the directory '''/FlightGear/bin''' via e.g. (modify to your path)  
For configuring your joystick using this approach, open a command shell (command prompt under windows, to be found under Start|All programs|Accessories). Change to the directory '''/FlightGear/bin''' via e.g. (modify to your path)  


'''cd c:\FlightGear\bin'''
cd c:\FlightGear\bin


and invoke the tool fgjs via  
and invoke the tool fgjs via  


'''./fgjs'''
./fgjs


on a UNIX/Linux machine, or via  
on a UNIX/Linux machine, or via  


'''fgjs'''
fgjs


on a Windows machine. The program will tell you which joysticks, if any, were detected. Now follow the commands given on screen, i.eṁove the axis and press the buttons as required. Be careful, a minor touch already “counts” as a movement. Check the reports on screen. If you feel something went wrong, just re-start the program.  
on a Windows machine. The program will tell you which joysticks, if any, were detected. Now follow the commands given on screen, i.eṁove the axis and press the buttons as required. Be careful, a minor touch already “counts” as a movement. Check the reports on screen. If you feel something went wrong, just re-start the program.  
Line 356: Line 356:
     </script>
     </script>
   </nasal>
   </nasal>


==Resource==
==Resource==

Navigation menu