summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/sensortagdataprovider.cpp
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2017-09-20 09:35:56 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2017-09-27 06:35:24 +0000
commitcf2ec248f2c8d6fabc539f2acef4df5d3c0e8b6c (patch)
tree01c4feef45ddf310113a7f2f2d5b06e20b443fbe /tradeshow/iot-sensortag/sensortagdataprovider.cpp
parent55ce120e6ceccb40f19a941fbda05edefd22d64c (diff)
iot-sensortag: Redesign of example
The updated version switches the focus from having multiple sensors locally towards showing one sensor from a list. This list can display local or remote sensors and switch on runtime. Also incorporated many style fixes and cleanups. Change-Id: If7b8acbb2a784ebba95d467176e76728721c82f7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/sensortagdataprovider.cpp')
-rw-r--r--tradeshow/iot-sensortag/sensortagdataprovider.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/tradeshow/iot-sensortag/sensortagdataprovider.cpp b/tradeshow/iot-sensortag/sensortagdataprovider.cpp
index f5defa3..409b95a 100644
--- a/tradeshow/iot-sensortag/sensortagdataprovider.cpp
+++ b/tradeshow/iot-sensortag/sensortagdataprovider.cpp
@@ -47,6 +47,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include "sensortagdataprovider.h"
#include <QtCore/QtMath>
@@ -72,36 +73,35 @@ SensorTagDataProvider::SensorTagDataProvider(QObject *parent)
: QObject(parent)
, pressureAtZeroAltitude(AIR_PRESSURE_P0)
{
-
}
-SensorTagDataProvider::SensorTagDataProvider(QString id, QObject* parent)
- : QObject(parent),
- humidity(0),
- irAmbientTemperature(0),
- irObjectTemperature(0),
- lightIntensityLux(0),
- barometerCelsiusTemperature(0),
- barometerTemperatureAverage(25),
- barometerHPa(0),
- gyroscopeX_degPerSec(0),
- gyroscopeY_degPerSec(0),
- gyroscopeZ_degPerSec(0),
- accelometerX(0),
- accelometerY(0),
- accelometerZ(0),
+SensorTagDataProvider::SensorTagDataProvider(QString id, QObject *parent)
+ : QObject(parent)
+ , humidity(0)
+ , irAmbientTemperature(0)
+ , irObjectTemperature(0)
+ , lightIntensityLux(0)
+ , barometerCelsiusTemperature(0)
+ , barometerTemperatureAverage(25)
+ , barometerHPa(0)
+ , gyroscopeX_degPerSec(0)
+ , gyroscopeY_degPerSec(0)
+ , gyroscopeZ_degPerSec(0)
+ , accelometerX(0)
+ , accelometerY(0)
+ , accelometerZ(0)
/* Object is not "walking in the air" so have one axis at 1G */
- magnetometerMicroT_xAxis(-1),
- magnetometerMicroT_yAxis(0),
- magnetometerMicroT_zAxis(0),
- rotation_x(0),
- rotation_y(0),
- rotation_z(0),
- intervalRotation(DEFAULT_REFRESH_INTERVAL_MS),
- altitude(0),
- m_tagType(AmbientTemperature | ObjectTemperature | Humidity | AirPressure | Light | Magnetometer | Rotation | Accelometer | Altitude),
- m_id(id),
- m_state(NotFound)
+ , magnetometerMicroT_xAxis(-1)
+ , magnetometerMicroT_yAxis(0)
+ , magnetometerMicroT_zAxis(0)
+ , rotation_x(0)
+ , rotation_y(0)
+ , rotation_z(0)
+ , intervalRotation(DEFAULT_REFRESH_INTERVAL_MS)
+ , altitude(0)
+ , m_tagType(AmbientTemperature | ObjectTemperature | Humidity | AirPressure | Light | Magnetometer | Rotation | Accelometer | Altitude)
+ , m_id(id)
+ , m_state(NotFound)
{
}