summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-01-13 11:35:47 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-01-13 11:35:47 +0100
commita7adca16f465ba0119247785aaf3f9d45afd24d1 (patch)
treea3793de10d5d6ea23c7ffca73adcf78ae1226960
parent393e522a8873064b597d28c6d7e920c9928e014d (diff)
downloaddevice_samsung_i9300-a7adca16f465ba0119247785aaf3f9d45afd24d1.zip
device_samsung_i9300-a7adca16f465ba0119247785aaf3f9d45afd24d1.tar.gz
device_samsung_i9300-a7adca16f465ba0119247785aaf3f9d45afd24d1.tar.bz2
Revert "libsensors: don't floor accelerometer value"
This reverts commit 1ea8f299e6b9c46eea55a9fa6ebee88faf91220e.
-rw-r--r--libsensors/AccelSensor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsensors/AccelSensor.cpp b/libsensors/AccelSensor.cpp
index d5040c1..fddb2cd 100644
--- a/libsensors/AccelSensor.cpp
+++ b/libsensors/AccelSensor.cpp
@@ -111,7 +111,7 @@ int AccelSensor::setDelay(int32_t handle, int64_t ns)
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
char buf[80];
- sprintf(buf, "%lld", ns);
+ sprintf(buf, "%lld", ns / 10000000 * 10); // Some flooring to match stock value
write(fd, buf, strlen(buf)+1);
close(fd);
return 0;