aboutsummaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorTruong Ta Xuan <truongtx8@gmail.com>2014-01-17 20:10:09 +0700
committersbrissen <sbrissen@hotmail.com>2014-01-17 10:13:55 -0500
commit63d3fddbbf85a73d24ca978f25ef62bf5ce23777 (patch)
tree0335cd2bed1e52289c08bf416172de79cad508d7 /libsensors
parentc35fdcf245558825e8a38e52e6825b54a15119e9 (diff)
downloaddevice_samsung_kona-common-63d3fddbbf85a73d24ca978f25ef62bf5ce23777.zip
device_samsung_kona-common-63d3fddbbf85a73d24ca978f25ef62bf5ce23777.tar.gz
device_samsung_kona-common-63d3fddbbf85a73d24ca978f25ef62bf5ce23777.tar.bz2
Fix light sensors for GT-N5100
Change-Id: Iaae68beeb4e65c64713b50c10e570db37ab6f2d4
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/Android.mk4
-rw-r--r--libsensors/sensors.cpp13
2 files changed, 16 insertions, 1 deletions
diff --git a/libsensors/Android.mk b/libsensors/Android.mk
index 1542efe..34796b4 100644
--- a/libsensors/Android.mk
+++ b/libsensors/Android.mk
@@ -28,6 +28,10 @@ LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\"
+ifeq ($(TARGET_DEVICE), n5110)
+LOCAL_CFLAGS := -DALS3201_SENSOR
+endif
+
LOCAL_SRC_FILES := \
sensors.cpp \
SensorBase.cpp \
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp
index 99bed29..0de6888 100644
--- a/libsensors/sensors.cpp
+++ b/libsensors/sensors.cpp
@@ -82,10 +82,21 @@ static const struct sensor_t sSensorList[] = {
"Yamaha Corporation",
1, SENSORS_ORIENTATION_HANDLE,
SENSOR_TYPE_ORIENTATION, 360.0f, CONVERT_O, 7.8f, 10000, 0, 0, { } },
+#ifndef ALS3201_SENSOR
+ { "GP2AP030 Light sensor",
+ "Sharp",
+ 1, SENSORS_LIGHT_HANDLE,
+ SENSOR_TYPE_LIGHT, 10240.0f, 1.0f, 0.75f, 0, 0, 0, { } },
+ { "GP2AP030 Proximity sensor",
+ "Sharp",
+ 1, SENSORS_PROXIMITY_HANDLE,
+ SENSOR_TYPE_PROXIMITY, 5.0f, 1.0f, 0.75f, 0, 0, 0, { } },
+#else
{ "AL3201 Light Sensor",
"LITEON",
1, SENSORS_LIGHT_HANDLE,
SENSOR_TYPE_LIGHT, 10240.0f, 1.0f, 0.75f, 0, 0, 0, { } },
+#endif
};
@@ -132,7 +143,7 @@ private:
proximity = 1,
bosch = 2,
yamaha = 3,
- orientation = 4,
+ orientation = 4,
numSensorDrivers,
numFds,
};