diff options
Diffstat (limited to 'libs/gui/Sensor.cpp')
-rw-r--r-- | libs/gui/Sensor.cpp | 12 |
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() { } |