Accelerometer Data
Michael Tansella
michael-tansella at gmx.de
Mon Mar 23 09:36:54 CET 2009
> In the latest andy-tracking it reports the more correct 'ABS' events.
> So now it does report zeros. However it doesn't report an axis if there
> has been no change.
Is it correct that there are now two changes for developers. The first one is
that the EVENT type has changed from EV_REL (0x02) to EV_ABS (0x03). This
would mean in the python sample code of the wiki the change would be:
from:
if type == 2:
if code == 0:
x = value
if code == 1:
y = value
if code == 2:
z = value
to:
if type == 3:
if code == 0:
x = value
if code == 1:
y = value
if code == 2:
z = value
The second change is that if no new (y,x, or z) value is reported the old one
should be taken.
>If you want to simply get "the current values"
> there is an ioctl : EVIOCGABS I think.
I think that is what most developers want. It would be great if someone could
show a small sample code how this works.
Greets
Michael
More information about the community
mailing list