summaryrefslogtreecommitdiff
path: root/libs/gui/Sensor.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-07-14 23:41:37 -0700
committerMathias Agopian <mathias@google.com>2010-07-19 17:57:29 -0700
commit1bf797857e025e8a71db86fb9e79765a767ec1eb (patch)
treee8d1aabae069f2b7368be746b99667eb150363f5 /libs/gui/Sensor.cpp
parentff7049ab2886acc73e145367118646f7741ce333 (diff)
new SensorService
remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
Diffstat (limited to 'libs/gui/Sensor.cpp')
-rw-r--r--libs/gui/Sensor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
index 1fdd285823d6..48e1cb7a9042 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -36,6 +36,18 @@ Sensor::Sensor()
{
}
+Sensor::Sensor(struct sensor_t const* hwSensor)
+{
+ mName = hwSensor->name;
+ mVendor = hwSensor->vendor;
+ mHandle = hwSensor->handle;
+ mType = hwSensor->type;
+ mMinValue = 0; // FIXME: minValue
+ mMaxValue = hwSensor->maxRange; // FIXME: maxValue
+ mResolution = hwSensor->resolution;
+ mPower = hwSensor->power;
+}
+
Sensor::~Sensor()
{
}