Hello, 

i modified the joystick settings for the Sidewinder Precision Pro joystick.
Now all buttons and axis react the same way in unix and windows except for
the view elevation binding which is on axis 5 in unix and 7 in windows. 
Here the windows axis is inverse, the unix version is not.
This means if you move the hat down in unix you will look down
if you move the hat down in windows you will look up.
To fix this we would need some sort of property to inverse the axis independly 
for windows and unix. If you know a way to do this feel free to fix this.


I also added some more button bindings. 
With button 1 you can now switch between the views,
The brakes where moved from button 1 to button 0 because this button was 
unused and users who want to switch from MS Flight Simulator to FlightGear 
will like that too because the buttons are now used the same way on both 
sims. With the unused button 8 (shift button), you can now retract the gears.

I also fixed the arrangement for the 4 buttons called A, B, C and D left to 
the stick.
With button B you can now turn the flaps up and with button A down. 
With button C you can use the left brake and with button D the right brake.
Before those changes the windows and unix bindings were different and somehow 
unordered (crossed).

I tested this new Joystick settings in Windows Millenium and
Linux Slackware 10 with Flightgear 0.9.6 for windows and the newest cvs 
version from today for Linux.
The xml file with the new joystick settings is attached to this e-mail.

Best Regards,
 Oliver C.




 

 




<?xml version="1.0"?>

<!--
************************************************************************
* Bindings for Microsoft SideWinder Precision Pro joystick.
*
*                                            
* Axis 0:                         ailerons
* Axis 1:                         elevator
* Axis 2(Unix)/3(Win) (twist):    rudder
* Axis 3(Unix)/2(Win):            throttle
* Axis 4(Unix)/6(Win) (hat):      view direction
* Axes 5(Unix)/7(Win) (hat):      view elevation
*
* In game Name:                   Action:             Button name on Joystick:    Value:
* Button 0 (trigger):             all brakes                                      0001
* Button 1:                       view-cylce                                      0002
* Button 2:                       elevator trim up                                0004
* Button 3:                       elevator trim down                              0008
* Button 4:                       flaps up            Button B                    0020
* Button 5:                       flap down           Button A                    0010
* Button 6:                       left brake only     Button C                    0040
* Button 7:                       right brake only    Button D                    0080
* Button 8(Unix)/9(Win):          gear up             Shift Button                0100(unix), 0200(Win)
************************************************************************
$Id: sidewinder-precision-pro.xml,v 1.20 2004/11/08 00:29:00 Oliver Exp $
-->

<PropertyList>

 <name>Microsoft SideWinder Precision Pro</name>
 <name>Microsoft SideWinder Precision 2 Joystick</name>
 <name>Microsoft Microsoft SideWinder Precision 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>
  <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>
   <desc>View Direction</desc>
   <number>
    <unix>4</unix>
    <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>
    <windows>7</windows>  <!-- axis is inverse in WinMe, please fix this -->
   </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 n="0">
  <desc>Brakes</desc>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/brake-left</property>
   <value type="double">1.0</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/brake-right</property>
   <value type="double">1.0</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/brake-left</property>
    <value type="double">0.0</value>
   </binding>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/brake-right</property>
    <value type="double">0.0</value>
   </binding>
  </mod-up>
 </button>


 <button n="1">
  <desc>view-cycle</desc>
  <repeatable>false</repeatable>
  <binding>
   <command>view-cycle</command>
  </binding>
 </button>

 <button n="2">
  <desc>Elevator trim up</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/elevator-trim</property>
   <step type="double">0.001</step>
  </binding>
 </button>

 <button n="3">
  <desc>Elevator trim down</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/elevator-trim</property>
   <step type="double">-0.001</step>
  </binding>
 </button>

 <button>
  <desc>Flaps up</desc>
  <number>
    <unix>4</unix>
    <windows>4</windows>
   </number>
  <repeatable>false</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/flaps</property>
   <step type="double">0.34</step>
  </binding>
 </button>
 
  <button>
  <desc>Flaps down</desc>
  <number>
    <unix>5</unix>
    <windows>5</windows>
   </number>
  <repeatable>false</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/flaps</property>
   <step type="double">-0.34</step>
  </binding>
 </button>

 <button>
  <desc>Left brake</desc>
  <number>
    <unix>6</unix>
    <windows>6</windows>
   </number>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/brake-left</property>
   <value type="double">1.0</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/brake-left</property>
    <value type="double">0.0</value>
   </binding>
  </mod-up>
 </button>
 
<button>
  <desc>Right brake</desc>
  <number>
    <unix>7</unix>
    <windows>7</windows>
   </number>   
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/brake-right</property>
   <value type="double">1.0</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/brake-right</property>
    <value type="double">0.0</value>
   </binding>
  </mod-up>
 </button>

 <button>
  <desc>Gear Up.</desc>
  <number>
    <unix>8</unix>
    <windows>9</windows>
   </number>  
  <repeatable>false</repeatable>
  <binding>
    <command>property-assign</command>
    <property>/controls/gear/gear-down</property>
    <value type="double">0.0</value>
  </binding>
 </button>

</PropertyList>


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to