From 184125415a55b45458ef303eae593d3c7dfc16c8 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 24 Mar 2013 12:36:45 +0100 Subject: sensors: Samsung Sensors compatibility Change-Id: I000c975da1f38c77269057b870463a7b3422da17 Signed-off-by: Paul Kocialkowski --- libsensors/AkmSensor.cpp | 12 +----------- libsensors/sensors.h | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 24 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<