summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/bluetoothdataprovider.cpp
diff options
context:
space:
mode:
authorOtto Ryynänen <otto.ryynanen@qt.io>2017-01-31 15:17:53 +0200
committerKari Hautamäki <kari.hautamaki@qt.io>2017-02-01 07:54:44 +0000
commit518c73c59a71911b65ae5d3240b22ea9f5878961 (patch)
treecccf04cbcc16bad01a6dbbbffc15bdefecbbc1e7 /tradeshow/iot-sensortag/bluetoothdataprovider.cpp
parent4a7c0e5841b2bb69ddaef2c9620c443934d194ee (diff)
GyroChart and Magnetometerchart grid removal
Removed grids from charts. changed magnetometer chart type. Removed old IR Temp from cloud IF. New signal(s) for Ambient and object temperatures. Change-Id: If9f215f33197ca1dc03b2a55187464fdb7a05cd9 Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/bluetoothdataprovider.cpp')
-rw-r--r--tradeshow/iot-sensortag/bluetoothdataprovider.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/tradeshow/iot-sensortag/bluetoothdataprovider.cpp b/tradeshow/iot-sensortag/bluetoothdataprovider.cpp
index c76404f..b84bb84 100644
--- a/tradeshow/iot-sensortag/bluetoothdataprovider.cpp
+++ b/tradeshow/iot-sensortag/bluetoothdataprovider.cpp
@@ -97,13 +97,20 @@ void BluetoothDataProvider::startServiceScan()
void BluetoothDataProvider::temperatureReceived(double newAmbientTemperature, double newObjectTemperature)
{
+ /* NOTE: We emit the signals even if value is unchanged.
+ * Otherwise the scrolling graphs in UI will not scroll.
+ */
irAmbientTemperature = newAmbientTemperature;
+ emit infraredAmbientTemperatureChanged();
irObjectTemperature = newObjectTemperature;
- emit infraredCelsiusTemperatureChanged();
+ emit infraredObjectTemperatureChanged();
}
void BluetoothDataProvider::barometerReceived(double temperature, double barometer)
{
+ /* NOTE: We emit the signals even if value is unchanged.
+ * Otherwise the scrolling graphs in UI will not scroll.
+ */
barometerCelsiusTemperature = temperature;
emit barometerCelsiusTemperatureChanged();
barometerTemperatureAverage = (temperature + m_smaSamples * barometerTemperatureAverage) / (m_smaSamples + 1);
@@ -118,11 +125,17 @@ void BluetoothDataProvider::barometerReceived(double temperature, double baromet
void BluetoothDataProvider::humidityReceived(double humidity)
{
+ /* NOTE: We emit the signals even if value is unchanged.
+ * Otherwise the scrolling graphs in UI will not scroll.
+ */
this->humidity = humidity;
emit relativeHumidityChanged();
}
void BluetoothDataProvider::lightIntensityReceived(double lightIntensity)
{
+ /* NOTE: We emit the signals even if value is unchanged.
+ * Otherwise the scrolling graphs in UI will not scroll.
+ */
lightIntensityLux = lightIntensity;
emit lightIntensityChanged();
}
@@ -136,6 +149,9 @@ float BluetoothDataProvider::countRotationDegrees(double degreesPerSecond, quint
void BluetoothDataProvider::motionReceived(MotionSensorData &data)
{
+ /* NOTE: We emit the signals even if value is unchanged.
+ * Otherwise the scrolling graphs in UI will not scroll.
+ */
gyroscopeX_degPerSec = data.gyroScope_x;
gyroscopeY_degPerSec = data.gyroScope_y;
gyroscopeZ_degPerSec = data.gyroScope_z;