Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-05 Thread Paul Surgeon
On Thursday, 4 December 2003 22:35, Frederic Bouvier wrote:
 I just want to point out here that axis are not the same for Linux and
 Windows : axis 2  3 are inverted, and the hat axis are not the same
 ( 45 for Linux, 67 for Windows ).

I just checked and you are correct - the axis are swapped between Doze and 
Linux.  :-|

 From the header of your message,
 I presume you are running Linux, so if your patch is commited, the guy
 that submit the previous one because his Windows setup didn't work
 will resubmit another to correct the behaviour broken for him

I think this is what has happened because I very clearly remember having the 
same problem with the Windows port a while back. (Well over a year ago)

 There is a risk of an endless loop here as you already detected it is
 an ongoing problem.

How does one check the CVS history of a file?
I've used WinCVS before but I'm a bit new on the command line version.
I want to see who has modified that xml binding file over the last couple of 
years.

 For other joysticks, the description name differs but it seems that
 this one share the same name on both systems.

Yes, the name is the same on both systems.

 So a correct, definitive, patch would be to discriminate bindings and
 only load those for the system where FG runs.

Yes that makes sense.
How about having two binding files for the stick like :
sidewinder-force-feed-pro-unix.xml
sidewinder-force-feed-pro-windows.xml
Then when FG loads and detects a sidewinder-force-feed-pro stick it can just 
load the correct bindings for the platform.

The best place to do this is probably at compile time with a #ifdef WIN32 type 
of statement that declares which sidewinder binding to use.
There is no need to do it dynamically at runtime.

Paul



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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-05 Thread Frederic Bouvier
Paul Surgeon wrote:
 On Thursday, 4 December 2003 22:35, Frederic Bouvier wrote:
  I just want to point out here that axis are not the same for Linux and
  Windows : axis 2  3 are inverted, and the hat axis are not the same
  ( 45 for Linux, 67 for Windows ).

 I just checked and you are correct - the axis are swapped between Doze and
 Linux.  :-|

  From the header of your message,
  I presume you are running Linux, so if your patch is commited, the guy
  that submit the previous one because his Windows setup didn't work
  will resubmit another to correct the behaviour broken for him

 I think this is what has happened because I very clearly remember having
the
 same problem with the Windows port a while back. (Well over a year ago)

  There is a risk of an endless loop here as you already detected it is
  an ongoing problem.

 How does one check the CVS history of a file?
 I've used WinCVS before but I'm a bit new on the command line version.
 I want to see who has modified that xml binding file over the last couple
of
 years.

http://cvs.flightgear.org/cgi-bin/viewcvs/viewcvs.cgi/?cvsroot=FlightGear-0.9

  For other joysticks, the description name differs but it seems that
  this one share the same name on both systems.

 Yes, the name is the same on both systems.

That's unfortunate.

  So a correct, definitive, patch would be to discriminate bindings and
  only load those for the system where FG runs.

 Yes that makes sense.
 How about having two binding files for the stick like :
 sidewinder-force-feed-pro-unix.xml
 sidewinder-force-feed-pro-windows.xml
 Then when FG loads and detects a sidewinder-force-feed-pro stick it can
just
 load the correct bindings for the platform.

 The best place to do this is probably at compile time with a #ifdef WIN32
type
 of statement that declares which sidewinder binding to use.
 There is no need to do it dynamically at runtime.

Actually, all bindings are included in $FG_ROOT/joysticks.xml, so it is this
file that needs to be forked. Not a bad idea after all ;-)

-Fred



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


[Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Paul Surgeon
The throttle and axis bindings need to be swapped in  
sidewinder-force-feed-pro.xml
The description at the top is correct but the bindings don't match.

This is an ongoing problem - I remember having the same problem over a year 
ago.

I've never made patch files before but here is my attempt :
==

--- sidewinder-force-feed-pro.xml2003-11-03 12:23:47.0 +0200
+++ sidewinder-force-feed-pro.xml  2003-12-04 21:45:27.0 +0200
@@ -46,7 +46,7 @@
   /binding
  /axis

- axis n=3
+ axis n=2
   descRudder/desc
   binding
commandproperty-scale/command
@@ -55,7 +55,7 @@
   /binding
  /axis

- axis n=2
+ axis n=3
   descThrottle/desc
   binding
commandproperty-scale/command

==

Regards
Paul


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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Frederic Bouvier
Paul Surgeon wrote:
 The throttle and axis bindings need to be swapped in
 sidewinder-force-feed-pro.xml
 The description at the top is correct but the bindings don't match.

 This is an ongoing problem - I remember having the same problem over a
year
 ago.

 I've never made patch files before but here is my attempt :

...

I just want to point out here that axis are not the same for Linux and
Windows : axis 2  3 are inverted, and the hat axis are not the same
( 45 for Linux, 67 for Windows ). From the header of your message,
I presume you are running Linux, so if your patch is commited, the guy
that submit the previous one because his Windows setup didn't work
will resubmit another to correct the behaviour broken for him.
There is a risk of an endless loop here as you already detected it is
an ongoing problem.

For other joysticks, the description name differs but it seems that
this one share the same name on both systems.
So a correct, definitive, patch would be to discriminate bindings and
only load those for the system where FG runs.

-Fred



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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Paul Surgeon
On Thursday, 4 December 2003 22:35, Frederic Bouvier wrote:
 I just want to point out here that axis are not the same for Linux and
 Windows : axis 2  3 are inverted, and the hat axis are not the same
 ( 45 for Linux, 67 for Windows ).

Whoa ... that sounds nuts!
I've never heard of that before.

 From the header of your message,
 I presume you are running Linux, so if your patch is commited, the guy
 that submit the previous one because his Windows setup didn't work
 will resubmit another to correct the behaviour broken for him.
 There is a risk of an endless loop here as you already detected it is
 an ongoing problem.

Well the interesting thing is that the axis were also swapped on Windows.
Whether I run FG under Windows or Linux I always have to edit the bindings and 
swap those two axis.

Paul


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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Frederic Bouvier
Paul Surgeon wrote:
 Well the interesting thing is that the axis were also swapped on Windows.
 Whether I run FG under Windows or Linux I always have to edit the bindings
and
 swap those two axis.

Are you using the hat ? they are also swapped.

If you are using the same file, you are doing the endless loop yourself.
To be sure, can you post the exact reported name for your joystick on
both system ?

Thanks,
-Fred



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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Paul Surgeon
On Thursday, 4 December 2003 23:27, Frederic Bouvier wrote:
 If you are using the same file, you are doing the endless loop yourself.

On Windows I was using a precompiled binary distribution.
On LInux I'm using the CVS version.
They were on seperate hard disks.

 To be sure, can you post the exact reported name for your joystick on
 both system ?

How do I do that?

Paul


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


Re: [Flightgear-devel] Patch for sidewinder-force-feed-pro.xml

2003-12-04 Thread Frederic Bouvier
Paul Surgeon wrote:
 On Thursday, 4 December 2003 23:27, Frederic Bouvier wrote:
  If you are using the same file, you are doing the endless loop yourself.

 On Windows I was using a precompiled binary distribution.
 On LInux I'm using the CVS version.
 They were on seperate hard disks.

  To be sure, can you post the exact reported name for your joystick on
  both system ?

 How do I do that?

You can start js_demo ( a plib example ) included in the Windows
distribution and compiled with the plib examples on Linux.

Mine is :
I:\FlightGear\fgfs-0.9.3-win32\FlightGear\bin\win32js_demo
Joystick test program.
~~
Joystick 0 is Logitech WingMan Extreme Digital 3D (USB)
Joystick 1 not detected
+---JS.0-+---JS.1-+
| Btns Ax:0 Ax:1 Ax:2 Ax:3 Ax:4 Ax:5 Ax:6 Ax:7 |   ~~~ Not Detected ~~~
|
+++
|  -0.0 +0.0 +1.0 +0.1 -1.0 -1.0 +0.0 +0.0 |  .   .   .   .   .   .   .
.   . |


You can also set you logging level to info ( --log-level=info )
and look at the printing at the end of initialisation something like :

Looking for bindings for joystick Logitech WingMan Extreme Digital 3D
(USB)
  Trying Analog 4-axis 4-button joystick
  Trying CH PRODUCTS CH PRO PEDALS USB 
  Trying CH Products  CH Pro Pedals USB Rudder Pedals 
  Trying CH PRO PEDALS USB 
  Trying CH PRODUCTS CH FLIGHT SIM YOKE USB 
  Trying CH FLIGHT SIM YOKE USB 
  Trying Logitech Inc. WingMan Extreme Digital 3D
  Trying Logitech WingMan Extreme Digital 3D (USB)
  Found bindings

The name should appear the same in the xml binding files to detect the
joystick.

Cheers,
-Fred



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