summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/clouddataprovider.cpp
diff options
context:
space:
mode:
authorOtto Ryynänen <otto.ryynanen@qt.io>2017-02-03 12:55:13 +0200
committerTitta Heikkala <titta.heikkala@qt.io>2017-02-03 12:21:58 +0000
commita1b4c4ad291ff531b6efe8fabe409dfaae3cc854 (patch)
tree9a3b0c0c0f17924276134432808221ebd0bbe46d /tradeshow/iot-sensortag/clouddataprovider.cpp
parent0a85dc729c5602c0914172bbf4b2b4e3171fcd85 (diff)
RotationPage added
Added a page that has three rotating disks. Current pictures are placeholders for final graphics. SensorTag can be recalibrated. Change-Id: I0666ab06e665d8c40861e170f36b09013b722973 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/clouddataprovider.cpp')
-rw-r--r--tradeshow/iot-sensortag/clouddataprovider.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tradeshow/iot-sensortag/clouddataprovider.cpp b/tradeshow/iot-sensortag/clouddataprovider.cpp
index d45d79f..46891fb 100644
--- a/tradeshow/iot-sensortag/clouddataprovider.cpp
+++ b/tradeshow/iot-sensortag/clouddataprovider.cpp
@@ -55,6 +55,7 @@
#define MAJOR_VERSION_NUMBER 1
#define MINOR_VERSION_NUMBER 1
+#define CLOUD_DATA_POLL_INTERVAL_MS 1000 /* 1 second update interval */
#ifndef QT_NO_SSL
static QString dataFetchUrl = "https://ottoryynanenqt.blob.core.windows.net/btsensortagreadings/sensorTagReadings.txt";
#else
@@ -67,6 +68,7 @@ CloudDataProvider::CloudDataProvider(QString id, QObject* parent)
: SensorTagDataProvider(id, parent)
, reply(Q_NULLPTR)
{
+ intervalRotation = CLOUD_DATA_POLL_INTERVAL_MS;
connect(&qnam, &QNetworkAccessManager::authenticationRequired,
this, &CloudDataProvider::slotAuthenticationRequired);
#ifndef QT_NO_SSL
@@ -79,7 +81,7 @@ bool CloudDataProvider::startDataFetching()
{
pollTimer = new QTimer(this);
connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollTimerExpired()));
- pollTimer->start(1000); // 1 second update interval
+ pollTimer->start(CLOUD_DATA_POLL_INTERVAL_MS);
return true;
}