From a7f7d382d83bc7e28c770bfeb010a3e8ef43b375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kari=20Hautam=C3=A4ki?= Date: Tue, 21 Feb 2017 11:19:10 +0200 Subject: 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 --- tradeshow/iot-sensortag/clouddataprovider.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tradeshow') 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() -- cgit v1.2.3