diff options
Diffstat (limited to 'src/plugins/sensors/blackberry')
-rw-r--r-- | src/plugins/sensors/blackberry/bbpressuresensor.cpp | 3 | ||||
-rw-r--r-- | src/plugins/sensors/blackberry/bbsensorbackend.cpp | 1 | ||||
-rw-r--r-- | src/plugins/sensors/blackberry/bbsensorbackend.h | 4 | ||||
-rw-r--r-- | src/plugins/sensors/blackberry/sensor.h | 6 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/sensors/blackberry/bbpressuresensor.cpp b/src/plugins/sensors/blackberry/bbpressuresensor.cpp index 8cb9b1ea..edbb3927 100644 --- a/src/plugins/sensors/blackberry/bbpressuresensor.cpp +++ b/src/plugins/sensors/blackberry/bbpressuresensor.cpp @@ -53,8 +53,7 @@ QString BbPressureSensor::devicePath() bool BbPressureSensor::updateReadingFromEvent(const sensor_event_t &event, QPressureReading *reading) { - // TODO: I was unable to test this since the device I was testing this with did not have - // a pressure sensor. Verify that this works and check that the units are correct. reading->setPressure(event.pressure_s.pressure); + reading->setTemperature(event.pressure_s.temperature); return true; } diff --git a/src/plugins/sensors/blackberry/bbsensorbackend.cpp b/src/plugins/sensors/blackberry/bbsensorbackend.cpp index 6b614a8a..7822dd86 100644 --- a/src/plugins/sensors/blackberry/bbsensorbackend.cpp +++ b/src/plugins/sensors/blackberry/bbsensorbackend.cpp @@ -303,6 +303,7 @@ bool BbSensorBackendBase::isFeatureSupported(QSensor::Feature feature) const case QSensor::Buffering: case QSensor::AccelerationMode: case QSensor::SkipDuplicates: + case QSensor::PressureSensorTemperature: return true; case QSensor::GeoValues: #ifndef Q_OS_BLACKBERRY_TABLET diff --git a/src/plugins/sensors/blackberry/bbsensorbackend.h b/src/plugins/sensors/blackberry/bbsensorbackend.h index 4e7b8101..953d7bcf 100644 --- a/src/plugins/sensors/blackberry/bbsensorbackend.h +++ b/src/plugins/sensors/blackberry/bbsensorbackend.h @@ -45,8 +45,8 @@ #include <QtCore/QFile> #include <QtCore/QSocketNotifier> -// Earlier NDK versions did not ship sensor.h, that is why we have our own copy in -// here. +// Earlier NDK versions did not ship sensor.h and the Playbook NDK still +// doesn't include it, that is why we have our own copy in here. // We prefer the NDK version if that exists, as that is more up-to-date. #ifdef HAVE_NDK_SENSOR_H #include <sensor/sensor.h> diff --git a/src/plugins/sensors/blackberry/sensor.h b/src/plugins/sensors/blackberry/sensor.h index fb5b935d..7317f076 100644 --- a/src/plugins/sensors/blackberry/sensor.h +++ b/src/plugins/sensors/blackberry/sensor.h @@ -40,8 +40,12 @@ ****************************************************************************/ // -// This file is a temporary copy until it becomes available in the Blackberry NDK. +// This file is a copy of the "sensor.h" header for the BlackBerry Playbook OS. +// It is only inclulded here, because it is not available in the the Playbook NDK. // +#if !defined(Q_OS_BLACKBERRY_TABLET) +#error "This file is supposed to be used only for BlackBerry Playbook OS." +#endif #ifndef SENSOR_H_ #define SENSOR_H_ |