summaryrefslogtreecommitdiffstats
path: root/libsensors/LightSensor.h
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2010-10-22 15:31:59 -0400
committerMike Lockwood <lockwood@google.com>2010-10-22 15:31:59 -0400
commita7b1f6b5f7951012bce331946e608c86f40e808a (patch)
treefe087439fd281904092d08caa520da2323a01ffb /libsensors/LightSensor.h
parent399345f89c4a69d80df78564122d757ffdd06c1e (diff)
downloaddevice_samsung_crespo-a7b1f6b5f7951012bce331946e608c86f40e808a.zip
device_samsung_crespo-a7b1f6b5f7951012bce331946e608c86f40e808a.tar.gz
device_samsung_crespo-a7b1f6b5f7951012bce331946e608c86f40e808a.tar.bz2
Ignore first four light sensor events after enabling the sensor.
The Crespo light sensor will report 4 bogus events that appear to be based on the value at the time the sensor was disabled when the sensor is reenabled. These events cause problems with monotonically increasing algorithm in the Power Manager ALS support. Change-Id: I6c53f9c93276921d359107df8ee0279579c50092 Signed-off-by: Mike Lockwood <lockwood@google.com>
Diffstat (limited to 'libsensors/LightSensor.h')
-rw-r--r--libsensors/LightSensor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libsensors/LightSensor.h b/libsensors/LightSensor.h
index 78e781a..b40283f 100644
--- a/libsensors/LightSensor.h
+++ b/libsensors/LightSensor.h
@@ -32,6 +32,7 @@ struct input_event;
class LightSensor : public SensorBase {
int mEnabled;
+ int mEventsSinceEnable;
InputEventCircularReader mInputReader;
sensors_event_t mPendingEvent;
bool mHasPendingEvent;