diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-21 11:19:10 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2017-02-21 09:29:05 +0000 |
commit | a7f7d382d83bc7e28c770bfeb010a3e8ef43b375 (patch) | |
tree | ec6256ebdc1d2d42b9c2d33a2e3ce15996854587 /tradeshow | |
parent | 8c8dba973fa203b8fe61ff196c0b413fc3fba365 (diff) |
iot-sensortag: Upate GyroChart graph when reading from the Azure cloud
Send the aggregate signal rotationValuesChanged when a changed
rotation value is read from the Azure cloud. SeriesStorage
uses this signal to update the series data.
Change-Id: I879f1e7c3b625541156fe909473397d7d40148bf
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'tradeshow')
-rw-r--r-- | tradeshow/iot-sensortag/clouddataprovider.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tradeshow/iot-sensortag/clouddataprovider.cpp b/tradeshow/iot-sensortag/clouddataprovider.cpp index af3f193..0c2bd0f 100644 --- a/tradeshow/iot-sensortag/clouddataprovider.cpp +++ b/tradeshow/iot-sensortag/clouddataprovider.cpp @@ -112,6 +112,7 @@ void CloudDataProvider::parseReceivedText() bool gyroscopeReadingGot = false; bool accelometerReadingGot = false; bool magnetometerReadingGot = false; + bool rotationReadingsGot = false; for (int stringIndex = 4 ; stringIndex < (dataList.length()-1) ; stringIndex+=2) { const QString headerText(dataList[stringIndex]); const double doubleValue = QString(dataList[stringIndex+1]).toDouble(); @@ -166,12 +167,15 @@ void CloudDataProvider::parseReceivedText() magnetometerMicroT_zAxis = floatValue; } else if ("RotX:" == headerText) { rotation_x = floatValue; + rotationReadingsGot = true; emit rotationXChanged(); } else if ("RotY:" == headerText) { rotation_y = floatValue; + rotationReadingsGot = true; emit rotationYChanged(); } else if ("RotZ:" == headerText) { rotation_z = floatValue; + rotationReadingsGot = true; emit rotationZChanged(); } else { qCDebug(boot2QtDemos) << "Unsupported Header:" << headerText; @@ -183,6 +187,8 @@ void CloudDataProvider::parseReceivedText() emit accelometerChanged(); if (magnetometerReadingGot) emit magnetometerMicroTChanged(); + if (rotationReadingsGot) + emit rotationValuesChanged(); } void CloudDataProvider::pollTimerExpired() |