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…]

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
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

One Reply to “OpenMoko newRotate checks brightness”

  1. 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!

Comments are closed.