Wheel controller issue

View: New views
4 Messages — Rating Filter:   Alert me  

Wheel controller issue

by tneva82 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Got strange inspiration to see whether wheel controller works like joystick. Had already joystick test program so ran it. Looks to be working. Detects joystick, plenty of buttons, 3 axis. Axis 0 is wheel itself(left, right), axis 1 seems to be brakes, axis 2 throtle. For throtle and brakes seems to be that when they aren't pushed they are 32xxx and when they are pushed to full -32xxx. I can work with that. Issue however is that before they are pressed they read 0. That's VERY inconvinient as after they are pressed 0 would be half-way pushed. Would become rather problematic in say racing game if player doesn't press throttle AND breaks before start in which case game would decide player is pressing them halfway(especially annoying for brakes...).

Is there way to fix this? Is SDL even suitable for programming wheel controllers? Wheel is thrustmaster wheel which SDL reports correctly(provides string Thrustmaster Thrustmasterforce feedback wheel as it's name).

Of course one could work around this by notifying at start of program for player to push both but seems rather inconvinient.

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Wheel controller issue

by Jonathan Dearborn-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could store the initial value of each axis, then ignore that axis
until the value changes the first time.

Jonny D


On Mon, Nov 2, 2009 at 7:18 PM, tneva82 <tneva82@...> wrote:

> Got strange inspiration to see whether wheel controller works like joystick.
> Had already joystick test program so ran it. Looks to be working. Detects
> joystick, plenty of buttons, 3 axis. Axis 0 is wheel itself(left, right),
> axis 1 seems to be brakes, axis 2 throtle. For throtle and brakes seems to
> be that when they aren't pushed they are 32xxx and when they are pushed to
> full -32xxx. I can work with that. Issue however is that before they are
> pressed they read 0. That's VERY inconvinient as after they are pressed 0
> would be half-way pushed. Would become rather problematic in say racing game
> if player doesn't press throttle AND breaks before start in which case game
> would decide player is pressing them halfway(especially annoying for
> brakes...).
>
> Is there way to fix this? Is SDL even suitable for programming wheel
> controllers? Wheel is thrustmaster wheel which SDL reports
> correctly(provides string Thrustmaster Thrustmasterforce feedback wheel as
> it's name).
>
> Of course one could work around this by notifying at start of program for
> player to push both but seems rather inconvinient.
> _______________________________________________
> SDL mailing list
> SDL@...
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Wheel controller issue

by Simon Roby :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds pretty normal to me. Steering wheels are usually expected to be
calibrated before use.

And yes, all game controllers are "joysticks", including steering
wheels. SDL uses an obsolete old-school terminology ("Joystick") for
its Game Controller API abstraction.

On Mon, Nov 2, 2009 at 19:18, tneva82 <tneva82@...> wrote:

> Got strange inspiration to see whether wheel controller works like joystick.
> Had already joystick test program so ran it. Looks to be working. Detects
> joystick, plenty of buttons, 3 axis. Axis 0 is wheel itself(left, right),
> axis 1 seems to be brakes, axis 2 throtle. For throtle and brakes seems to
> be that when they aren't pushed they are 32xxx and when they are pushed to
> full -32xxx. I can work with that. Issue however is that before they are
> pressed they read 0. That's VERY inconvinient as after they are pressed 0
> would be half-way pushed. Would become rather problematic in say racing game
> if player doesn't press throttle AND breaks before start in which case game
> would decide player is pressing them halfway(especially annoying for
> brakes...).
>
> Is there way to fix this? Is SDL even suitable for programming wheel
> controllers? Wheel is thrustmaster wheel which SDL reports
> correctly(provides string Thrustmaster Thrustmasterforce feedback wheel as
> it's name).
>
> Of course one could work around this by notifying at start of program for
> player to push both but seems rather inconvinient.
> _______________________________________________
> SDL mailing list
> SDL@...
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>



--
--
- SR
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Wheel controller issue

by Donny Viszneki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 2, 2009 at 7:18 PM, tneva82 <tneva82@...> wrote:

> Got strange inspiration to see whether wheel controller works like joystick.
> Had already joystick test program so ran it. Looks to be working. Detects
> joystick, plenty of buttons, 3 axis. Axis 0 is wheel itself(left, right),
> axis 1 seems to be brakes, axis 2 throtle. For throtle and brakes seems to
> be that when they aren't pushed they are 32xxx and when they are pushed to
> full -32xxx. I can work with that. Issue however is that before they are
> pressed they read 0. That's VERY inconvinient as after they are pressed 0
> would be half-way pushed. Would become rather problematic in say racing game
> if player doesn't press throttle AND breaks before start in which case game
> would decide player is pressing them halfway(especially annoying for
> brakes...).
>
> Is there way to fix this? Is SDL even suitable for programming wheel
> controllers? Wheel is thrustmaster wheel which SDL reports
> correctly(provides string Thrustmaster Thrustmasterforce feedback wheel as
> it's name).

I don't believe this is a property of racing wheels, nor SDL, nor
racing wheels with SDL. It may be a property of your Thrustmaster, or
of the drivers you're using for it.

I have seen this sort of thing with many hardware access APIs and many
gaming devices. It has always been kind of a pain.

> Of course one could work around this by notifying at start of program for
> player to push both but seems rather inconvinient.

It is, but it's what I've always done. From the perspective of a
gaming controller manufacturer, *some* kind of dynamic definition of
range seems like an attractive decision, since it means the device
won't become uncalibrated over time.

If someone with a great deal more knowledge on the subject would like
to chime in, I'd love a history lesson :)

--
http://codebad.com/
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org