Re: [Flightgear-devel] Re: [Flightgear-cvslogs]CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Erik Hofman
Al West wrote:
Is all this required?  Surely the axes mapping difference is consistant.
Do you know that for sure. I don't. Heck I don't even have a joystick, 
let alone that I use Linux *or* Windows.

So don't expect much from me until I see a patch and an explanation.

Erik

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs]CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Al West
Is all this required?  Surely the axes mapping difference is consistant.  So 
that all the would be required is to apply the appropraite mapping at compile 
time.  I don't think there is a need to have glorified or different config 
files for joysticks.

On Tuesday 27 April 2004 15:32, Richard Bytheway wrote:
> Could the joystick file have a section which defines "virtual" named axes
> (pitch, roll, yaw, throttle, hat_x, hat_y etc) which are mapped to the
> appropriate FG input (elevator, aileron, rudder, throttle, view x and view
> y), and then have a section for each OS which maps axis numbers to virtual
> axes as defined in the file.
>
> Richard
>
> > -Original Message-
> > From: Erik Hofman [mailto:[EMAIL PROTECTED]
> > Sent: 27 April 2004 3:21 pm
> > To: FlightGear developers discussions
> > Subject: Re: [Flightgear-devel] Re: [Flightgear-cvslogs]CVS:
> > FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18
> >
> > Melchior FRANZ wrote:
> > > So we'd need two config files for *every* joystick (with more than
> > > two axes)? That's IMHO not acceptable. I'd rather prefer a mechanism
> > > that makes one and the same config file work for both systems then.
> >
> > After endless times of no discussion and no solutions I
> > hacked something
> > together that works for every situation. Not acceptable won't
> > do in this
> > case unless I see something show up that is elegant and that works in
> > every situation.
> >
> > Erik
> >
> > ___
> > Flightgear-devel mailing list
> > [EMAIL PROTECTED]
> > http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> >
> > __
> > __
> > This e-mail has been scanned for all viruses by Star Internet. The
> > service is powered by MessageLabs. For more information on a proactive
> > anti-virus service working around the clock, around the globe, visit:
> > http://www.star.net.uk
> > __
> > __
>
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Melchior FRANZ -- Tuesday 27 April 2004 18:20:
> winval = atts.getValue("n_win");// or "windows"
[...]
>   if (winval != -1 && current_os == "windows")
[...]
> ... assuming that a non existent attribute returns -1.

It's a string or char* and does of course return 0.  :-)

m.

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Erik Hofman -- Tuesday 27 April 2004 17:50:
> Right now code other than SimGear's property I/O code can access the 
> attributes. To get this working I need to access them in FlightGear, but 
> every(?) attribute other than "n=" is disregarded...

I still don't get it. In props_io.cxx:164ff, why can't we say there
something like:

attval = atts.getValue("n");
winval = atts.getValue("n_win");// or "windows"

int index = 0;
if (attval != 0) {
  if (winval != -1 && current_os == "windows")
index = atoi(winval);
  else
index = atoi(attval);
  st.counters[name] = SG_MAX2(st.counters[name], index+1);
} else {
  index = st.counters[name];
  st.counters[name]++;
}

... assuming that a non existent attribute returns -1.

m.

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Erik Hofman
Melchior FRANZ wrote:
* Andy Ross -- Tuesday 27 April 2004 17:23:

Melchior FRANZ wrote:


This is syntactically cleaner, but the code changes required are
severe.  XML Attributes in property files are interpreted only by the
SimGear property parser, they aren't available in the resulting
property tree.
They don't need to be in the property tree: if there is a windows
attribute and fgfs is running on Windows, then don't store the
axis definition for axis 2 but for axis 3 *while parsing*. Why would
we want to access this information later on? (Do I misunderstand
something? I admit that I don't understand all the XML parser
implications.)
Right now code other than SimGear's property I/O code can access the 
attributes. To get this working I need to access them in FlightGear, but 
every(?) attribute other than "n=" is disregarded...

Erik

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Andy Ross -- Tuesday 27 April 2004 17:23:
> Melchior FRANZ wrote:
> >  
> 
> This is syntactically cleaner, but the code changes required are
> severe.  XML Attributes in property files are interpreted only by the
> SimGear property parser, they aren't available in the resulting
> property tree.

They don't need to be in the property tree: if there is a windows
attribute and fgfs is running on Windows, then don't store the
axis definition for axis 2 but for axis 3 *while parsing*. Why would
we want to access this information later on? (Do I misunderstand
something? I admit that I don't understand all the XML parser
implications.)

m.

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Andy Ross
Melchior FRANZ wrote:
> Whereby "unix" would be an alias for "n" and the line could also be
> written as
>
>  

This is syntactically cleaner, but the code changes required are
severe.  XML Attributes in property files are interpreted only by the
SimGear property parser, they aren't available in the resulting
property tree.

Again, let's solve the problem right now so we don't lose new users,
then figure out how to handle it cleanly later on.  Maybe it will turn
out that a "standard" axis swap will work for all or most joysticks.

Andy

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Melchior FRANZ -- Tuesday 27 April 2004 16:49:
> * Erik Hofman -- Tuesday 27 April 2004 16:37:
> > I bet you can come up with a clever solution where only the platform 
> > specific part are in the actual configuration file and everything else 
> > gets included from a shared file ...
> 
> 

Whereby "unix" would be an alias for "n" and the line could also be
written as

 

No need for shared files.

m.

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Erik Hofman -- Tuesday 27 April 2004 16:37:
> I bet you can come up with a clever solution where only the platform 
> specific part are in the actual configuration file and everything else 
> gets included from a shared file ...


Rudder

property-scale
/controls/flight/rudder
0.0
1.0
2.0



m.

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Erik Hofman
Melchior FRANZ wrote:
* Erik Hofman -- Tuesday 27 April 2004 16:21:

Melchior FRANZ wrote:

So we'd need two config files for *every* joystick (with more than
two axes)? That's IMHO not acceptable. 

Not acceptable won't do in this case unless I see something show up
that is elegant and that works in every situation.
I meant "not acceptable" as in "I won't maintain two versions of my
Cyborg-Gold-3d-USB joystick config". I don't care otherwise.
I bet you can come up with a clever solution where only the platform 
specific part are in the actual configuration file and everything else 
gets included from a shared file ...

Erik

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Mathias Fröhlich
On Dienstag, 27. April 2004 16:33, Melchior FRANZ wrote:
> * Erik Hofman -- Tuesday 27 April 2004 16:21:
> > Melchior FRANZ wrote:
> > > So we'd need two config files for *every* joystick (with more than
> > > two axes)? That's IMHO not acceptable.
> >
> > Not acceptable won't do in this case unless I see something show up
> > that is elegant and that works in every situation.
>
> I meant "not acceptable" as in "I won't maintain two versions of my
> Cyborg-Gold-3d-USB joystick config". I don't care otherwise.
Me too for the Thrustmaster one ...

   Greetings

  Mathias

-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Erik Hofman -- Tuesday 27 April 2004 16:21:
> Melchior FRANZ wrote:
> 
> > So we'd need two config files for *every* joystick (with more than
> > two axes)? That's IMHO not acceptable. 

> Not acceptable won't do in this case unless I see something show up
> that is elegant and that works in every situation.

I meant "not acceptable" as in "I won't maintain two versions of my
Cyborg-Gold-3d-USB joystick config". I don't care otherwise.

m.

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


RE: [Flightgear-devel] Re: [Flightgear-cvslogs]CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Richard Bytheway
Could the joystick file have a section which defines "virtual" named axes (pitch, 
roll, yaw, throttle, hat_x, hat_y etc) which are mapped to the appropriate FG input 
(elevator, aileron, rudder, throttle, view x and view y), and then have a section for 
each OS which maps axis numbers to virtual axes as defined in the file.

Richard

> -Original Message-
> From: Erik Hofman [mailto:[EMAIL PROTECTED]
> Sent: 27 April 2004 3:21 pm
> To: FlightGear developers discussions
> Subject: Re: [Flightgear-devel] Re: [Flightgear-cvslogs]CVS:
> FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18
> 
> 
> Melchior FRANZ wrote:
> 
> > So we'd need two config files for *every* joystick (with more than
> > two axes)? That's IMHO not acceptable. I'd rather prefer a mechanism
> > that makes one and the same config file work for both systems then.
> 
> After endless times of no discussion and no solutions I 
> hacked something 
> together that works for every situation. Not acceptable won't 
> do in this 
> case unless I see something show up that is elegant and that works in 
> every situation.
> 
> Erik
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 
> __
> __
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> __
> __
> 

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Andy Ross
Erik Hofman wrote:
> After endless times of no discussion and no solutions I hacked
> something together that works for every situation. Not acceptable
> won't do in this case unless I see something show up that is elegant
> and that works in every situation.

Agreed.  We need to get something actually works in windows put
together pronto.  We can go back after the fact and make the solution
more elegant, but right now novice windows users just think we're
broken.

Andy

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Erik Hofman
Melchior FRANZ wrote:

So we'd need two config files for *every* joystick (with more than
two axes)? That's IMHO not acceptable. I'd rather prefer a mechanism
that makes one and the same config file work for both systems then.
After endless times of no discussion and no solutions I hacked something 
together that works for every situation. Not acceptable won't do in this 
case unless I see something show up that is elegant and that works in 
every situation.

Erik

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Jon S Berndt
On Tue, 27 Apr 2004 06:58:41 -0700
 Andy Ross <[EMAIL PROTECTED]> wrote:
Many/most of the joysticks don't work for windows users.  They
download the program, try it, and then complain when the "view is
constantly spinning around".  One presumes the axis mappings are
simply different between the platforms, but us Linux folks are more 
or less helpless to handle these cases.

There are similar complaints on the avsim.com forum too.

Andy
With the AvSim forum, the FlightGear mailing lists, and other forums 
that have seen wider discussions of FlightGear and its consituent 
programs, I think FAQs take on a whole new importance.  I'm getting 
ready to field one for JSBSim, too.

Jon

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Frederic Bouvier -- Tuesday 27 April 2004 15:49:
> Melchior FRANZ wrote:
> > Because Unix and Windows don't always agree on axis numeration.
> 
> In fact, they never agree. axis 2 & 3 are reverted, and the hat has 
> different numbering, for the same joystick name.

So we'd need two config files for *every* joystick (with more than
two axes)? That's IMHO not acceptable. I'd rather prefer a mechanism
that makes one and the same config file work for both systems then.

m.

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


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Andy Ross
Jim Wilson wrote:
> Erik Hofman checked in:
> > Make it possible to define a  tag in the joystick
> > configuration file. This would make it possible to have different
> > configuration files for Windows. Possible values are: Windows, UNIX
> > or All.  Not specifying the tag equals to 'All'.
>
> Just curious,  why is this required?

Someone hasn't been hanging out on the IRC server. :)

Many/most of the joysticks don't work for windows users.  They
download the program, try it, and then complain when the "view is
constantly spinning around".  One presumes the axis mappings are
simply different between the platforms, but us Linux folks are more or
less helpless to handle these cases.

There are similar complaints on the avsim.com forum too.

Andy

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Frederic Bouvier
Melchior FRANZ wrote:
> * Jim Wilson -- Tuesday 27 April 2004 15:12:
> > Erik Hofman said:
> > > Make it possible to define a tag in the joystick
> > > configuration file. This would make it possible to have different
> > > configuration files for Windows.
> 
> > Just curious, why is this required?
> 
> Because Unix and Windows don't always agree on axis numeration.

In fact, they never agree. axis 2 & 3 are reverted, and the hat has 
different numbering, for the same joystick name.

-Fred


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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Melchior FRANZ
* Jim Wilson -- Tuesday 27 April 2004 15:12:
> Erik Hofman said:
> > Make it possible to define a  tag in the joystick
> > configuration file. This would make it possible to have different
> > configuration files for Windows.

> Just curious,  why is this required?

Because Unix and Windows don't always agree on axis numeration.

m.

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


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Input input.cxx, 1.43, 1.44 input.hxx, 1.17, 1.18

2004-04-27 Thread Jim Wilson
Erik Hofman said:

> Update of /var/cvs/FlightGear-0.9/FlightGear/src/Input
> In directory baron:/tmp/cvs-serv26245
> 
> Modified Files:
>   input.cxx input.hxx 
> Log Message:
> Make it possible to define a  tag in the joystick
configuration file. This would make it possible to have different
configuration files for Windows. Possible values are: Windows, UNIX or All.
Not specifying the tag equals to 'All'.
> 

Just curious,  why is this required?

Best,

Jim


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