Thanks for the full bug report, that will be very handy. On first
glance, I would guess that the problem is related to your joystick
reporting "sync" and "msc" event types. That's quite unusual for a
joystick. Is [hid] reporting the axes and buttons correctly?
If you could also send me the "lsusb -v" output for that device and the
Make/Model (or even better, a link to the product page).
.hc
On Apr 4, 2005, at 6:17 AM, Lazzaro Nicolò Ciccolella wrote:
Hans-Christoph Steiner ha scritto:
It would also be helpful if you used a version with the debug
messages on. You can do that in hid.c by swapping these two: #define DEBUG(x) //#define DEBUG(x) x to //#define DEBUG(x) #define DEBUG(x) x and recompiling.Hi, I have rebuilded following your instructions. I have created a patch with only the object "HID 3" and three messages "start" "stop" and "print".
when I open the patch:
" hid_setup hid_new [hid] 0.5, written by Hans-Christoph Steiner hans@eds.org hid_open [hid] opened device 3 (/dev/input/event3): Mega World Inter. USB GAME
DEVICE CONTROLLER "when I push the message "print":
" Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0' Device 1: 'ImPS/2 Generic Wheel Mouse' on '/dev/input/event1' Device 2: 'saa7134 IR (LifeView FlyVIDEO20' on '/dev/input/event2' Device 3: 'Mega World Inter. USB GAME DEVICE CONTROLLER ' on
'/dev/input/event3'Supported events:
TYPE CODE EVENT NAME
syn syn_report Synchronization syn syn_config Synchronization syn ? Synchronization syn ? Synchronization
TYPE CODE EVENT NAME
key btn_0 btn_trigger key btn_1 btn_thumb key btn_2 btn_thumb2 key btn_3 btn_top
TYPE CODE EVENT NAME
abs abs_x Absolute Axis abs abs_y Absolute Axis abs abs_misc Absolute Axis
TYPE CODE EVENT NAME
msc ? Miscellaneous
Detected: 4 Sync types 4 Key/Button types 3 Absolute Axis types 1 Misc types "
When I push the message "start":
" hid_start [hid] polling started "
When I touch the joystick, pd quit itself with the output
"Segmentation fault" in consolle.Now I am enough sure that the joystick comes managed correctly from
linux becouse I have compiled the small test program "read example"
(the example 10) from "http://www.frogmouth.net/hid-doco/c537.html"
and it work fine:bash-3.00# ./esempio /dev/input/event3 Event: time 1112609421.288484, type 4, code 4, value 65584 Event: time 1112609421.288486, type 3, code 0, value 72 Event: time 1112609421.288487, type 0, code 0, value 0 Event: time 1112609423.752072, type 4, code 4, value 65584 Event: time 1112609423.752074, type 3, code 0, value 70 Event: time 1112609423.752075, type 0, code 0, value 0 Event: time 1112609423.928042, type 4, code 4, value 65584 Event: time 1112609423.928043, type 3, code 0, value 72 Event: time 1112609423.928044, type 0, code 0, value 0 Event: time 1112609423.960036, type 4, code 4, value 65584 Event: time 1112609423.960037, type 3, code 0, value 74 Event: time 1112609423.960038, type 0, code 0, value 0 Event: time 1112609424.183998, type 4, code 4, value 65584 Event: time 1112609424.183999, type 3, code 0, value 72 Event: time 1112609424.184000, type 0, code 0, value 0 etc.. "
many thanks
Lazzaro
"Computer science is no more related to the computer than astronomy is
related to the telescope."
-Edsger Dykstra