Yes, I have an xml file for the freedom2.4 joystick. It is in the path and file
Input/Joysticks/Logitech/freedom2_4.xml. I tried your suggestion of editing
the joystick.xml file, but it appears to just read the same file.
This is the freedom2_4.xml
---- Begin freedom2_4.xml ---
<?xml version="1.0" ?>
<!--
************************************************************************
* Bindings for Logitech Freeedom2-4 (USB) joystick based on
* Bindings for Logitech WingMan Extreme Digital 3D (USB) joystick.
*
*
* Axis 0: ailerons
* Axis 1: elevator
* Axis 2 (slider): throttle
* Axis 3 (twist): rudder
* Axes 6 and 7 (hat): view direction
*
* Button 0: all brakes
* Button 1: trigger
* Button 2: elevator trim up
* Button 3: flap up
* Button 4: elevator trim down
* Button 5: flap down
* Button 6: right brake only
* Button 7: left brake only
* Button 8: prop coarse (advance)
* Button 9: prop fine (retard)
************************************************************************
-->
<PropertyList>
<name>Logitech Freedom 2.4</name>
<name>Logitech Logitech Freedom 2.4</name>
<name>Logitech Freedom 2.4 USB</name>
<axis>
<desc>Aileron</desc>
<number>
<unix>0</unix>
<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>
<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>
<windows>2</windows>
</number>
<binding>
<command>nasal</command>
<script>controls.throttleAxis()</script>
</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>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">5.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">-5.0</step>
</binding>
</high>
</axis>
<axis>
<desc>View Elevation</desc>
<number>
<unix>5</unix>
<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">5.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">-5.0</step>
</binding>
</high>
</axis>
<button>
<desc>Brakes</desc>
<number>
<unix>0</unix>
<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>Trigger</desc>
<number>
<unix>1</unix>
<windows>1</windows>
</number>
<binding>
<command>property-assign</command>
<property>ai/submodels/trigger</property>
<value type="bool">1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>ai/submodels/trigger</property>
<value type="bool">0</value>
</binding>
</mod-up>
</button>
<button>
<desc>Elevator trim up</desc>
<number>
<unix>2</unix>
<windows>2</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>4</unix>
<windows>4</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>
<windows>3</windows>
</number>
<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>
<desc>Flaps up</desc>
<number>
<unix>5</unix>
<windows>5</windows>
</number>
<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>
<desc>Left brake</desc>
<number>
<unix>6</unix>
<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>
<button>
<desc>Right brake</desc>
<number>
<unix>7</unix>
<windows>7</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>Propeller Coarse</desc>
<number>
<unix>8</unix>
<windows>8</windows>
</number>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/engines/engine/propeller-pitch</property>
<step type="double">0.1</step>
<min type="double">-1</min>
<max type="double">1</max>
</binding>
</button>
<button>
<desc>Propeller Fine</desc>
<number>
<unix>9</unix>
<windows>9</windows>
</number>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/engines/engine/propeller-pitch</property>
<step type="double">-0.1</step>
<min type="double">-1</min>
<max type="double">1</max>
</binding>
</button>
<!-- -->
</PropertyList>
---- End freedom2_4.xml ---
I also ran fgjs and created a js0.xml with some interesting results. Now the
Aileron, Elevator, and rudder Axes work, but the throttle axis, the cooley hat
axes and NONE of the buttons do not. I can send that file separately.
I was looking at some of the other joystick xml files and noticed some tags
that appear platform specific namely: <unix> <mac> and <windows>
Would this be an issue?
Thanks for your help
Jack
On Aug 2,---- Begin freedom2_4.xml ---
2011, at 4:34 AM, Viktor Radnai wrote:
> Bah, now that I've actually read the title of this email chain... Have
> you got a file called Input/Joysticks/Logitech/freedom2-4.xml, or is it
> only in git?
>
> Cheers,
> Vik
>
> On 08/02/2011 12:54 PM, Viktor Radnai wrote:
>> Hi,
>>
>> Flightgear has a file called joysticks.xml that references the
>> individual jsX.xml files that should be read and processed. I tend to
>> hand-edit these, but that requires some googling and/or experience.
>>
>> Many joysticks have pre-defined xml files bundled with FG at
>> Input/Joystick/<manufacturer>/<product>.xml. If your stick is one of
>> those, then the easiest option by far would be to change joysticks.xml
>> to contain something like this:
>>
>> <?xml version="1.0"?>
>> <PropertyList>
>> <js-named include="Input/Joysticks/Saitek/Aviator.xml"/>
>> </PropertyList>
>>
>> (Replace the path with the one appropriate for your joystick)
>>
>> If this does not work for you because your stick is not listed, then you
>> can also look at joysticks.xml to see where js[0].xml would be located,
>> and then edit that. Inside you should find all of your axes and buttons
>> listed, with appropriate mappings.
>>
>> If you send over this file, I can take a look at it to see if I can spot
>> any obvious problems. What stick have you got?
>>
>> Cheers,
>> Vik
>>
>> On 08/02/2011 10:19 AM, Jack Moore wrote:
>>> Greetings all,
>>>
>>> I'm a newbie running FG on MacOS X Snow Leopard. When the joystick is
>>> connected, the axes do not respond, but all ten buttons appear to work
>>> fine in FG. The joystick is being recognized in FG. If I go under
>>> Help->Joystick It shows ti correct model, the correct number of
>>> buttons, and the correct number of axes. The button and axis
>>> assignments appear to be assigned as I would expect. If I run js_demo,
>>> the joystick is recognized, the buttons work as expected, and each of
>>> the axes goes through its corresponding values. If I run fgjs, again,
>>> everything appears to be recognized, except the cooley hat axes. When
>>> I exit I get a bus error. The js[0].xml file looks OK though. But I do
>>> not know where to put the js[0].xml file.
>>>
>>> Any suggestions?
>>>
>>> BTW flying with the keyboard is the pits.
>>>
>>> Jack
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
>>> The must-attend event for mobile developers. Connect with experts.
>>> Get tools for creating Super Apps. See the latest technologies.
>>> Sessions, hands-on labs, demos& much more. Register early& save!
>>> http://p.sf.net/sfu/rim-blackberry-1
>>> _______________________________________________
>>> Flightgear-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/flightgear-users
>>>
>
> ------------------------------------------------------------------------------
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Flightgear-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-users
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users