Accelerometer Data
Iain B. FIndleton
ifindleton at videotron.ca
Mon Mar 23 14:06:46 CET 2009
Okay, it looks like the 2.6.28 kernel and modules are an improvement for
the accelerometer data, but the report times, while not negative any
more, appear somewhat erratic. The type codes appear to be unchanged in
this build, with the driver reporting EV_REL and EV_SYN.
Thanks for the various suggestions. I will report whatever else I find
that appears interesting.
Iain F.
Michael Tansella wrote:
>> 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
>
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>
More information about the community
mailing list