Joystick not detected

Fabrizio Gennari fabrizio.ge at tiscali.it
Thu Feb 7 14:47:52 PST 2008


I have an USB gamepad (a Colour Rumble Pad), and HAL fails to detect it 
as input.joystick.

OS: Linux (Fedora 8), version 0.5.10.

[fab at dhcppc1 ~]$ cat /sys/class/input/input3/name
Jess Tech Colour Rumble Pad
[fab at dhcppc1 ~]$ cat /sys/class/input/input3/capabilities/abs 
30027

My understanding of HAL code is that 30027 is interpreted as a hex number, and its bits are matched against
ABS_X, ABS_Y, ABS_Z etc., defined in include/linux/input.h

#define ABS_X                    0x00
#define ABS_Y                    0x01
#define ABS_Z                    0x02

In this case, the final 7 means that ABS_X, ABS_Y, ABS_Z are all set.

Strong suspects are on these lines of hald/linux/device.c


269         /* TODO: Hmm; this code looks sketchy... why do we do !test_bit on the Y axis ?? */
270         if (test_bit(ABS_X, bitmask) && !test_bit(ABS_Y, bitmask)) {
271                 long bitmask_touch[NBITS(KEY_MAX)];
272 
273                 hal_device_add_capability (d, "input.joystick");

It is as if HAL does not detect as joystick something with ABS_Y...





More information about the hal mailing list