summaryrefslogtreecommitdiffstats
path: root/libsensors/AkmSensor.cpp
diff options
context:
space:
mode:
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;
}
}