[maemo-developers] listenning for orientation changes using dbus
From: Ian Stirling maemo at mauve.plus.comDate: Tue Oct 19 22:58:28 EEST 2010
- Previous message: listenning for orientation changes using dbus
- Next message: Package Promotion Assistance?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David Hautbois wrote: > Hello > I'm looking for a way to listen for orientation changes using dbus. > the subscription to the mce dbus service "sig_device_orientation_ind" > works fine, but only when the device is unlocked. > I'm using this to avoid battery draining. > > I also tried Qmobility, but this uses 10% of CPU. > I don't think that an infinite loop querying the orientation is the good > trick.... > > How to enable this signal when the device is locked ? > Is there another way ? > The good news is the hardware can interrupt on orientation change. (sort-of). The bad news is that the kernel driver does not do this. The only way to read the accel is to poll. Depending on the latency you need, polling may not be too bad. A 5s poll isn't _too_ nasty on battery life.
- Previous message: listenning for orientation changes using dbus
- Next message: Package Promotion Assistance?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]