On Sun, Mar 02, 2008 at 10:34:28PM -0500, Stephen Wille Padnos wrote:
> The reason is that there's no way to get a complete list of all joystick
> devices (axes and buttons) before you get the first "event".  If you try
> to enumerate all the axes first, and the joystick gets moved while
> you're doing it, then there will be a motion event thrown in the middle
> of the capabilities enumeration.  Also, there's no "that's it, those are
> all the buttons I've got" message.  You can get notified of a new button
> or axis at any time.  So, the best thing to do is to just start the
> event loop, and if you receive an "event" that says "this is analog axis
> #7", just export a HAL pin.  If it's a button or motion event, then
> change the appropriate HAL pin.
> 
> (at least that's my recollection of the issues jmkasunich had to deal
> with when writing the driver in the first place)

And for this reason, the driver is broken (strictly speaking) -- all
userspace drivers must call hal_ready() after creating all pins.  This
is what allows halcmd 'loadusr -W' to wait the proper amount of time
before executing the following commands.

Jeff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to