Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: device/generic_sensor/linux/platform_sensor_utils_linux.h

Issue 2492773002: [sensors][CrOS/Linux] Implementation of motion sensors for CrOS/Linux platforms (Closed)
Patch Set: rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/linux/platform_sensor_utils_linux.h
diff --git a/device/generic_sensor/linux/platform_sensor_utils_linux.h b/device/generic_sensor/linux/platform_sensor_utils_linux.h
index 593ba31c4670251b63b0287b1af35aab7931f7a6..834074e4493d6435f62bb1a7aae1cf9ce3e6774c 100644
--- a/device/generic_sensor/linux/platform_sensor_utils_linux.h
+++ b/device/generic_sensor/linux/platform_sensor_utils_linux.h
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
#include "device/generic_sensor/generic_sensor_export.h"
+#include "device/generic_sensor/linux/sensor_data_linux.h"
namespace device {
@@ -29,12 +30,20 @@ class DEVICE_GENERIC_SENSOR_EXPORT SensorReader {
bool ReadSensorReading(SensorReading* reading);
private:
- explicit SensorReader(std::vector<base::FilePath> sensor_paths);
+ SensorReader(std::vector<base::FilePath> sensor_paths,
+ double scaling_value,
+ const SensorDataLinux::ReaderFunctor& apply_scaling_func);
// Contains paths to sensor files that are set when
// Create() is called.
const std::vector<base::FilePath> sensor_paths_;
+ // Scaling values that are applied to raw data from sensors.
+ const double scaling_value_;
+
+ // Used to apply scalings and invert signs if needed.
+ const SensorDataLinux::ReaderFunctor apply_scaling_func_;
+
DISALLOW_COPY_AND_ASSIGN(SensorReader);
};
« no previous file with comments | « device/generic_sensor/generic_sensor_consts.h ('k') | device/generic_sensor/linux/platform_sensor_utils_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698