summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/clouddataprovider.cpp
diff options
context:
space:
mode:
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;
}