#26 add position support to linuxjoystick

Player (393)

From Paul Osmialowski:

I've attached whole rewritten linuxjoy.cc file (and
also a diff) that makes able to use joystick as a robot :)
It is still single-interface driver, so you have to
choose one interface that it will provide: "joystick:0"
or "position:0"
name "linuxjoystick"
provides ["position:0"]
axis_maxima [10 10]
axes [0 1]
port "/dev/input/js0"
Notice that on systems with 2.6 kernel default joystick
port is /dev/input/js0
Also I've changed meaning of axis_maxima variable while
using the position interface (I didn't want to add new
configuration variable). All x and y position values
are divided by axis_maxima values. You can put
axis_maxima [1 1] to get normal values from your joystick.


  • Brian Gerkey

    Brian Gerkey - 2005-02-27
  • Brian Gerkey

    Brian Gerkey - 2005-05-02
    • labels: --> Player
    • assigned_to: nobody --> gerkey
  • Brian Gerkey

    Brian Gerkey - 2005-05-02
    • status: open --> closed-accepted
  • Brian Gerkey

    Brian Gerkey - 2005-05-02

    Logged In: YES

    I've merged this functionality in, though in a slightly
    different way. The linuxjoystick driver is now
    multi-interface, so it can support either joystick,
    position, or both. No config requests are supported, on
    either interface. The position interface reports *raw* X-
    and Y-axis values as xpos and ypos, without dividing by
    axis_maxima (I don't like the idea of overloading the
    semantics of that option, and don't see the advantage of
    scaling these value).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks