Just a question : what about MacOS ? do they support joysticks ?


Mac OS X supports joysticks from 10.2 on. There are also tools like Gamepad Companion from CarvWare and USB Overdrive X that allow you to map keys to joystick controls


<off topic altert>
BTW, here's a (year old) review of flightgear on the Mac: http://www.macobserver.com/tip/2003/05/25.1.shtml
<end off topic alert>


However, I have been having problems with joysticks under Mac OS X.2 and X.3

I use js_demo from plib and fgjs to verify the joystick, check the joystick name and so forth. I update the appropriate xml files for the joystick(s) in question

FG used to show which joysticks it was attempting to match (and which it matched) for all joysticks/rudder pedals etc. upon startup.

With all the log file changes, that's no longer displayed by default. How can I turn it on again? Is there particular documentation for logging on certain things (like joysticks found) to the console 8-) without getting everything logged?

Now there can be DOZENS of issues here (many of them USER issues 8-( ), but at a minimum it would be nice to see exactly which joystick flightgear is using (and what it thinks the axes are and buttons are) at FG loadtime on the console IMHO.

The joystick I'm trying to get it to use is: "MacALLY USB Joystick " -- yes, PLIB found the extra space so I'm giving it for the matching routine below in <name>. Perhaps that doesn't need to be done anymore?

js_demo shows:
got input element... button
got input element... button
got input element... button
got input element... button
got input element... axis
got input element... axis
got input element... hat
got input element... axis

When I pull back on the stick, js_demo reads Ax:1 +0.4
When I push forward on the stick, js_demo reads Ax: 1 -0.5
Joystick to left gives: Ax: 0 -0.5
Joystick to right gives: Ax: 0 +0.4
The throttle wheel rolled all the way forward gives Ax: 2 -1.0
The throttle wheel rolled all the way back gives Ax: 2 +0.0

Can someone help me translate these values to power and factor types below?

In any case, I don't think flightgear is in fact finding my joystick even though plib seems to recognize it
as it's name is not show up in the joysticks property list.


BTW, I know that having the throttle wheel used to control the rudder is a bit strange, but mac powerbook keyboards don't seem to work very well often for certain flightgear keyboard combination, and some of my favorite airports have that runway in a tunnel problem and I crash a lot if i don't stay perfectly centered (in fairness, I crash a lot even when I do stay centered).

Even as it is, the throttle as elevator control only seems to work for left elevator to center -- no right elevator, but again I'm not sure if FG is in fact using the joystick that I think it is. Perhaps because PLIB only sees the throttle wheel in the -1 to 0 range?

I would dearly like to have an n_mac section for those axes/buttons that are os dependent, if any.

BTW does PLIB support hats, js_demo shows it but doesn't seem to allow anything on the hat to be set to a joystick value. It's entirely possible (even likely) that I'm doing something wrong however. (I know there is a PLIB list and will take it there if this is too off topic for FG)

I'd like to also be able to flip views with the hat on the joystick in a perfect world. Does anyone have any experience setting up hats with other joysticks?

Lastly, should js modifications go into plib or into fg somewhere?

MacALLY USB Joystick.xml file
========================
<PropertyList>

<name>MacAlly USB Joystick </name>

 <axis n="0">
  <desc>Aileron</desc>
  <binding>
   <command>property-scale</command>
   <property>/controls/flight/aileron</property>
   <power type="double">6</power>
  </binding>
 </axis>

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

 <axis n="2">
  <desc>Rudder</desc>
  <low>
   <repeatable type="bool">true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/controls/flight/rudder</property>
    <step type="double">-0.01</step>
   </binding>
  </low>
  <high>
   <repeatable type="bool">true</repeatable>
   <binding>
    <command>property-adjust</command>
    <property>/controls/flight/rudder</property>
    <step type="double">0.01</step>
   </binding>
  </high>
 </axis>

 <button n="0">
  <desc>Brakes</desc>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[0]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[1]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[2]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[0]/brake</property>
    <value type="double">0.0</value>
   </binding>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[1]/brake</property>
    <value type="double">0.0</value>
   </binding>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[2]/brake</property>
    <value type="double">0.0</value>
   </binding>
  </mod-up>
 </button>

 <button n="1">
  <desc>Center rudder</desc>
  <binding>
   <command>property-assign</command>
   <property>/controls/flight/rudder</property>
   <value type="double">0.0</value>
  </binding>
 </button>

 <button n="2">
  <desc>Flaps up</desc>
  <binding>
   <command>property-adjust</command>
   <property>/controls/flight/flaps</property>
   <step type="double">-0.34</step>
  </binding>
 </button>

 <button n="3">
  <desc>Brakes</desc>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[0]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[1]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <binding>
   <command>property-assign</command>
   <property>/controls/gear/wheel[2]/brake</property>
   <value type="double">1.0</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[0]/brake</property>
    <value type="double">0.0</value>
   </binding>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[1]/brake</property>
    <value type="double">0.0</value>
   </binding>
   <binding>
    <command>property-assign</command>
    <property>/controls/gear/wheel[2]/brake</property>
    <value type="double">0.0</value>
   </binding>
</mod-up>
 </button>

 <button n="4">
  <desc>Flaps down</desc>
   <binding>
   <command>property-adjust</command>
   <property>/controls/flight/flaps</property>
   <step type="double">0.34</step>
  </binding>
 </button>

From inside File, Browse Internal Properties /input/joysticks I see

js/
js[1] = '' (none)
js[2] = '' (none)
js[3] = '' (none)
js[4] = '' (none)
js[5] = '' (none)
js[6] = '' (none)
js[7] = '' (none)
js[8] = '' (none)
js[9] = '' (none)
js_named[999] = '' (unspecified)
js_named[1000]/
js_named[1001]/
js_named[1002]/
js_named[1003]/
js_named[1004]/
js_named[1005]/
js_named[1006]/ ... js_named[1024]


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

Reply via email to