CyanogenMod/android_device_htc_vision — pull request #3 by ahilliard (2012-02-10 02:44:49+00:00)
Title: A more sensible default for CM Auto Brightness on the Vision?

Hi, I've tried to improve the default Auto Brightness settings for the Vision/G2. The current default autobrightness ranges from 11..2601, which doesn't match the light sensor output from 1..1024. This means the auto brightness isn't responsive in medium-to-dark environments, and it skips steps.

This patch matches the overlay config.xml's "config_autoBrightnessLevels" to the existing libsensors/LightSensor.cpp. Explanation below:

Since the HTC Vision's light sensor can only output 10 values (see LightSensor.cpp):

1 3 5 19 26 69 219 309 498 1024

...the config_autoBrightnessLevels array should have 10 'stops', equally spaced (on a log scale) between the possible lightsensor values.

0 2 4 10 22 42 123 260 392 714

As for the values in the config_autoBrightnessLcdBacklightValues array, I started from a pitch-black-room screen brightness of 40, to a full-daylight brightness of 255, then interpolated with an exponential function (to match how the human eye sees brightness).

I hope this might make its way to Andromadus, I'm loving their CM9 alpha. Thanks!