summaryrefslogtreecommitdiffstats
path: root/libsensors/AkmSensor.cpp
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-03-24 12:36:45 +0100
committerPaul Kocialkowski <contact@paulk.fr>2013-03-24 12:36:45 +0100
commit184125415a55b45458ef303eae593d3c7dfc16c8 (patch)
treecd76a54ddbec419d47a51b32ed939c2beeb6e72b /libsensors/AkmSensor.cpp
parent2f0942e4df16247863dd5717b7e61535bcd11cf1 (diff)
downloaddevice_samsung_crespo-replicant-4.0.tar.gz
device_samsung_crespo-replicant-4.0.tar.bz2
device_samsung_crespo-replicant-4.0.zip
sensors: Samsung Sensors compatibilityreplicant-4.0
Change-Id: I000c975da1f38c77269057b870463a7b3422da17 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'libsensors/AkmSensor.cpp')
-rw-r--r--libsensors/AkmSensor.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp
index 5a269e4..de60481 100644
--- a/libsensors/AkmSensor.cpp
+++ b/libsensors/AkmSensor.cpp
@@ -118,9 +118,6 @@ AkmSensor::AkmSensor()
if (!ioctl(data_fd, EVIOCGABS(EVENT_TYPE_ROLL), &absinfo)) {
mPendingEvents[Orientation].orientation.roll = -absinfo.value;
}
- if (!ioctl(data_fd, EVIOCGABS(EVENT_TYPE_ORIENT_STATUS), &absinfo)) {
- mPendingEvents[Orientation].orientation.status = uint8_t(absinfo.value & SENSOR_STATE_MASK);
- }
}
// disable temperature sensor, since it is not supported
@@ -226,7 +223,7 @@ int AkmSensor::readEvents(sensors_event_t* data, int count)
while (count && mInputReader.readEvent(&event)) {
int type = event->type;
- if (type == EV_REL) {
+ if (type == EV_ABS) {
processEvent(event->code, event->value);
mInputReader.next();
} else if (type == EV_SYN) {
@@ -295,12 +292,5 @@ void AkmSensor::processEvent(int code, int value)
mPendingMask |= 1<<Orientation;
mPendingEvents[Orientation].orientation.roll = value * CONVERT_O_R;
break;
- case EVENT_TYPE_ORIENT_STATUS:
- uint8_t status = uint8_t(value & SENSOR_STATE_MASK);
- if (status == 4)
- status = 0;
- mPendingMask |= 1<<Orientation;
- mPendingEvents[Orientation].orientation.status = status;
- break;
}
}