diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-20 17:58:51 +0200 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@qt.io> | 2017-02-21 05:29:56 +0000 |
commit | 22ca8687ef2c4ebbbc8d40fd41b45335b0058418 (patch) | |
tree | 0e5cbe767111e19fbcf2295be587732fad6b1985 /tradeshow/iot-sensortag/main.cpp | |
parent | 9a66a8ba9887be7ebf7f8fa93c80da8e1fc4325f (diff) |
iot-sensortag: Add MockDataProviderPool
Add MockDataProviderPool that derives directly from
SensorTagDataProviderPool. This allows building for Android without
a dependency to SensorTagDataProviderPool that can be used only
when a device runs in host mode
Change-Id: I3ff6fe36b80a4ee5dfe9815c811cc6bf016e3e6d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/main.cpp')
-rw-r--r-- | tradeshow/iot-sensortag/main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tradeshow/iot-sensortag/main.cpp b/tradeshow/iot-sensortag/main.cpp index e6f3381..f2cf849 100644 --- a/tradeshow/iot-sensortag/main.cpp +++ b/tradeshow/iot-sensortag/main.cpp @@ -59,11 +59,12 @@ #include "bluetoothdataprovider.h" #include "sensortagdataprovider.h" #include "sensortagdataproviderpool.h" +#include "demodataproviderpool.h" #endif #include "clouddataprovider.h" #include "clouddataproviderpool.h" #include "mockdataprovider.h" -#include "demodataproviderpool.h" +#include "mockdataproviderpool.h" #ifdef AZURE_UPLOAD #include "cloudupdate.h" #endif @@ -117,10 +118,7 @@ int main(int argc, char *argv[]) #endif else if (sensorSource == QString("mock").toLower()){ qCDebug(boot2QtDemos) << "Running in mock data mode"; - // Replace this with modified DemoDataProviderPoool, - // which combines data from three devices - dataProviderPool = new DemoDataProviderPool; - static_cast<DemoDataProviderPool*>(dataProviderPool)->setMockDataMode(true); + dataProviderPool = new MockDataProviderPool; } else { qCDebug(boot2QtDemos) << "Unknown mode: " << sensorSource; |