From 23cda827610c50a9f3ec8cd63610191c69fe6291 Mon Sep 17 00:00:00 2001 From: sbrissen Date: Mon, 30 Dec 2013 09:24:23 -0500 Subject: t0lte: sensors clean up -remove Orienatation from AKM sensor, its never used -fix compass, East and West were reversed Change-Id: I286930d20847347e36a90c815fd67ab00c9a03bf --- libsensors/AkmSensor.cpp | 35 ++++++++--------------------------- libsensors/sensors.cpp | 5 ----- libsensors/sensors.h | 11 ++--------- 3 files changed, 10 insertions(+), 41 deletions(-) diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp index 160df2a..baca688 100644 --- a/libsensors/AkmSensor.cpp +++ b/libsensors/AkmSensor.cpp @@ -83,11 +83,6 @@ AkmSensor::AkmSensor() mPendingEvents[MagneticField].type = SENSOR_TYPE_MAGNETIC_FIELD; mPendingEvents[MagneticField].magnetic.status = SENSOR_STATUS_ACCURACY_HIGH; - mPendingEvents[Orientation ].version = sizeof(sensors_event_t); - mPendingEvents[Orientation ].sensor = ID_O; - mPendingEvents[Orientation ].type = SENSOR_TYPE_ORIENTATION; - mPendingEvents[Orientation ].orientation.status = SENSOR_STATUS_ACCURACY_HIGH; - // read the actual value of all sensors if they're enabled already struct input_absinfo absinfo; short flags = 0; @@ -103,25 +98,6 @@ AkmSensor::AkmSensor() mPendingEvents[MagneticField].magnetic.z = absinfo.value * CONVERT_M_Z; } } - - if (akm_is_sensor_enabled(SENSOR_TYPE_ORIENTATION)) { - mEnabled |= 1<= 0) { + char buf[80]; + sprintf(buf, "%lld", ns); + write(fd, buf, strlen(buf)+1); + close(fd); + } + mDelays[what] = ns; return 0; } diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index 193c932..689c717 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -52,8 +52,6 @@ #define SENSORS_LIGHT (1<