From 1bf797857e025e8a71db86fb9e79765a767ec1eb Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 14 Jul 2010 23:41:37 -0700 Subject: new SensorService remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281 --- libs/gui/Sensor.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/gui/Sensor.cpp') diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp index 1fdd285..48e1cb7 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() { } -- cgit v1.1