|
|
03-06-2011
, 07:53 PM
|
|
|
Posts: 1,014 |
Thanked: 762 times |
Joined on Jun 2009
@ Toronto
|
#2
|
|
|
03-06-2011
, 08:02 PM
|
|
Posts: 310 |
Thanked: 381 times |
Joined on Jan 2010
|
#3
|
Recommended to kill the daemon when device is locked and respawn it once it's unlocked. dbuscron can be used for that.
I see the displayOn sanity check - but will constantly polling completely destroy battery life?
I literally threw this script together in an hour just to get some feedback on the algorithm.| The Following User Says Thank You to nightfire For This Useful Post: | ||
|
|
03-07-2011
, 10:45 PM
|
|
Posts: 310 |
Thanked: 381 times |
Joined on Jan 2010
|
#4
|
| The Following User Says Thank You to nightfire For This Useful Post: | ||
![]() |
| Thread Tools | Search this Thread |
|
I'm working on a light sensing daemon to automatically adjust the backlight based on detected ambient light.
My work-in-progress (proof of concept, really) is attached, if anyone would like to try it. Specifically, I'd appreciate any feedback about the thresholds I've set or any weird behavior.
Once I've got the algorithm tweaked I'll write a proper daemon in C with a nice settings panel, and clean up the other system events that set the backlight on their own.
For now, just run it as root in a console, throw it in the background, and it'll do its thing. Feel free to play around with the variables defined in the top of the script and send me your settings if you like them better.