OpenMoko newRotate checks brightness


Oscar Casamitja patched the old rotate program to change brightness on rotate in order to better hide xrandr’s artifacts. That’s actually a very good idea.

This new version reads from actual_brightness and set into brightness, which you can find in /sys/class/backlight/pcf50633-bl/ , in order to skip packet reading when the screen is dimmed, which is the next best thing to checking wether the screen is locked.

I run into a problem, though: it seems that if I open() actual_brightness once, I never again read an updated value, which makes me have to read on every loop :(

Enough talk, get it here: rotate-0.3.0.tar.gz (ascii sig) [now, if only this bug was fixed on projects.openmoko.org...]

Hope you’re enjoying it… :)

$ head -2 ChangeLog
2008-10-14 - 0.3.0
	* dims while rotating and doesn't rotate if dimmed, sleeping for 5s
$ cat KNOWN_ISSUES
Known Issues:
	* I'm not getting updated results if I only open
	  /sys/class/backlight/pcf50633-bl/actual_brightness once
	  which means I need to open it on every cycle.
	  Since it's in memory and not an actual file, wast should
	  not be too much
	* some heuristic values may need fine tunning

, , ,

  1. #1 by Sebastian "stein" Billaudelle on 14 de Outubro de 2008 - 22:06

    Wow! Great tool!

    Maybe one point: I think it would be better to rotate the screen after holding the Neo one second after turning it. At the moment sometimes the screen rotates if I shake the Neo…

    Thanks for this tool!
    Sebastian

  •  

    Outubro 2008
    S T Q Q S S D
    « Set   Nov »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Currently on Identi.ca...

    • @kanarip moving to Cardiff? Looking for Torchwood, are we? ;) 6 hrs ago
    • Even if most of them don't even know its name :) 7 hrs ago
    • For those w think I live outside corporate world, I'll be 10 years old at my current job this year. Portuguese find this company essential. 7 hrs ago
    • More updates...