FSO 2.6.28 usage report
simon.kagstrom at gmail.com
Mon Jan 12 17:47:08 CET 2009
On Mon, 12 Jan 2009 14:33:00 +0100
Stefan Schmidt <stefan at openmoko.org> wrote:
> > | Threshold for accels. We finally like to ship the great accel
> > | gesture application from our GSoC student, but it would only be
> > | really useful if we could set a threshold instead of parsing
> > | data all the time and burn cpu.
> > This is done by Simon Kagstrom some time ago, it's down in /sys.
> > Maybe Simon can give some advice.
> Cool, that must have slipped through our radar. Simon, is the
> threshold working and if how can we use it?
I sneaked it in low under the radar at the kernel mailing list ~two
months ago or so :-)
It's simple to use, just write the threshold value in mg's
to /sys/.../lis302dl.1/threshold. Writing zero will revert to the
default behavior and generate each data item. To get a feeling of how
it works, just hexdump the accelerometer input device and raise the
threshold until the device no longer generates data when lying still on
If you drop it to the floor and it doesn't generate data, you set the
threshold too high. Or the phone broke.
In the long run, I think an adaptive daemon could be used to export the
accelerometer data with thresholds. The threshold can be a slight
problem if the user use slow, smooth moves (although I think the
duration parameter can help with that).
So I think the daemon could set the threshold high at start, wake up
when the user starts moving around the phone and set the threshold to
zero until the device stops moving.
The issue of users walking around with the phone with
accelerometer-dependent apps is ... an interesting problem.
More information about the openmoko-kernel