Re: [Emc-users] Joypad Example

2008-03-02 Thread Jeff Epler
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

Re: [Emc-users] Joypad Example

2008-02-23 Thread ben lipkowitz
On Fri, 22 Feb 2008, Kirk Wallace wrote: Another bit I don't understand: /* STEP 3: allocate shared memory for joystick data */ js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t)); if (js_data == 0) { printf( ERROR: hal_malloc() failed\n); hal_exit(comp_id);

Re: [Emc-users] Joypad Example

2008-02-23 Thread Kirk Wallace
On Sat, 2008-02-23 at 07:52 +, ben lipkowitz wrote: On Fri, 22 Feb 2008, Kirk Wallace wrote: Another bit I don't understand: /* STEP 3: allocate shared memory for joystick data */ js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t)); if (js_data == 0) { printf( ERROR:

[Emc-users] Joypad Example

2008-02-22 Thread Kirk Wallace
I think hal_joystick.c: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/user_comps/devices/hal_joystick.c?rev=1.2;content-type=text%2Fplain might be a good model to follow for making my modbus user-land component. My guess would be that one would setup HAL and the the HAL pins and then

Re: [Emc-users] Joypad Example

2008-02-22 Thread Kirk Wallace
On Fri, 2008-02-22 at 17:51 -0800, Kirk Wallace wrote: I think hal_joystick.c: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/user_comps/devices/hal_joystick.c?rev=1.2;content-type=text%2Fplain might be a good model to follow for making my modbus user-land component. My guess