Hello. On Mon, 2009-01-12 at 17:47, Simon Kagstrom wrote: > On Mon, 12 Jan 2009 14:33:00 +0100 > Stefan Schmidt <[email protected]> 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 :-)
heh > 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 > the table. OK, cool. That should give us enough input to work it out in userspace. > 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. Hmm, interesting approach. We should discuss about this once we have fso MS5 out. Hopefully in February we can go in hack-and-break mode again. :) > The issue of users walking around with the phone with > accelerometer-dependent apps is ... an interesting problem. Indeed. Thanks for the kernel work on this. BTW, what was the last word on wakeup from the accels? With a god threshold this could be nice. :) regards Stefan Schmidt
