From dbc6da918cb77f4d96df97fd8f7c326f2783699a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Tue, 25 Oct 2011 17:54:35 -0700 Subject: 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.2 lux). Change-Id: I121ce0f23dca093c9607ac9447b9263f48507a09 --- libsensors/sensors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsensors/sensors.cpp') diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index 450dbd5..a884ce7 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -80,7 +80,7 @@ static struct sensor_t sSensorList[LOCAL_SENSORS + MPLSensor::numSensors] = { { "GP2A Light sensor", "Sharp", 1, SENSORS_LIGHT_HANDLE, - SENSOR_TYPE_LIGHT, 3000.0f, 1.0f, 0.75f, 0, { } }, + SENSOR_TYPE_LIGHT, powf(10, 125.0f/ 24.0f) * 4, 1.0f, 0.75f, 0, { } }, { "GP2A Proximity sensor", "Sharp", 1, SENSORS_PROXIMITY_HANDLE, -- cgit v1.1