Re: joydev.c and saitek cyborg evo force

From: Dmitry Torokhov
Date: Tue Jun 12 2007 - 09:13:20 EST


Hi Renato,

On 6/12/07, Renato Golin <rengolin@xxxxxxxxx> wrote:
On 12/06/07, Jiri Kosina <jkosina@xxxxxxx> wrote:
> the thing is that the aim of this quirk is to normalize the values that
> are being reported by bogus devices, so we don't really want to trust the
> values they provide here, do we?

Hi Jiri,

I don't know about the other joysticks, but Saitek did reported [0,
4096] which is the right answer, but between HID and Joydev it was
converted to [-127, 127]. I thought that the quirk was about that.


We need to find out why you see [-127, 127] range, because if joydev
would see [0, 4096] range it would perform automatic correction and
map values like this:

c0: 2048, c1: 2048, c2: 262144, c3: 262144
0 -> -32768
204 -> -29504
408 -> -26240
612 -> -22976
816 -> -19712
1020 -> -16448
1224 -> -13184
1428 -> -9920
1632 -> -6656
1836 -> -3392
2040 -> -128
2244 -> 3136
2448 -> 6400
2652 -> 9664
2856 -> 12928
3060 -> 16192
3264 -> 19456
3468 -> 22720
3672 -> 25984
3876 -> 29248
4080 -> 32512

Which is fine as far as I can see. What utility did you use that
reported [-127; 127] range?

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/