diff options
author | Arve Hjønnevåg <arve@android.com> | 2011-11-01 19:59:11 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-01 19:59:11 -0700 |
commit | 2e0ab7265e3039fee787c2216e0c98d92ea0b49e (patch) | |
tree | 3728597fe0e21d5624eef9d209aa24f89958f76b /libsensors/sensors.cpp | |
parent | 7e88d42adb9310bf560f00d2250f7c4c528f03d4 (diff) | |
download | device_samsung_crespo-2e0ab7265e3039fee787c2216e0c98d92ea0b49e.tar.gz device_samsung_crespo-2e0ab7265e3039fee787c2216e0c98d92ea0b49e.tar.bz2 device_samsung_crespo-2e0ab7265e3039fee787c2216e0c98d92ea0b49e.zip |
sensors: Return a calculated lux value instead using the current 8 entry table
The light sensor now uses the lux to current formula in the datasheet,
I = 10 * log(Ev) uA, and multiplies the result by 4 as an attempt
to correct for the glass in front of the sensor.
Also update the config_autoBrightnessLevels table so the auto brightness
change occurs at the same adc values as before (or close for 7.26 and
94.5 lux).
Change-Id: I5a54fda8eca26006671064b7db1e39ba0a5d7889
Diffstat (limited to 'libsensors/sensors.cpp')
-rw-r--r-- | libsensors/sensors.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index ec2d754..1dc128a 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -82,7 +82,7 @@ static const struct sensor_t sSensorList[] = { { "GP2A Light sensor", "Sharp", 1, SENSORS_LIGHT_HANDLE, - SENSOR_TYPE_LIGHT, 3000.0f, 1.0f, 0.75f, 0, { } }, + SENSOR_TYPE_LIGHT, powf(10, (280.0f / 47.0f)) * 4, 1.0f, 0.75f, 0, { } }, { "GP2A Proximity sensor", "Sharp", 1, SENSORS_PROXIMITY_HANDLE, |