diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-16 08:33:49 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2017-02-28 13:16:09 +0000 |
commit | 35c1c07cd676b9c9afb23ad7266a67d5b6aef03a (patch) | |
tree | d43445955be5f1799ca9bb9db2c6e2cfd7915370 /tradeshow/iot-sensortag/bluetoothdataprovider.h | |
parent | dec3883a1d0d7d24c797cf517fa7fad85b24a1f2 (diff) |
iot-sensortag: Allow reconnect after a failed connection attempt
A disconnected sensor tag can be tried to be reconnected by clicking
on the chart area or starting rescan from the Sensor settings menu.
During a (re)connection process a progress indicator is shown to
the user.
The user has a possibility to disconnect (and reconnect) a
currently connect SensorDataProvider
A new state, 'NotFound' is added in SensorTagDataProvider to
distinguish between states when a Sensor Tag has not been discovered
at all, and when it has already been discovered but is has been
disconnected.
Change-Id: I54eea72d8c92a67a5ccbb3bc192ac8f33ada1c39
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/bluetoothdataprovider.h')
-rw-r--r-- | tradeshow/iot-sensortag/bluetoothdataprovider.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tradeshow/iot-sensortag/bluetoothdataprovider.h b/tradeshow/iot-sensortag/bluetoothdataprovider.h index f4c4b15..691b94c 100644 --- a/tradeshow/iot-sensortag/bluetoothdataprovider.h +++ b/tradeshow/iot-sensortag/bluetoothdataprovider.h @@ -70,6 +70,7 @@ public: QString versionString() const; void bindToDevice(BluetoothDevice *device); + void unbindDevice(); BluetoothDevice* device(); public slots: @@ -88,7 +89,7 @@ protected: private: void updateState(); float countRotationDegrees(double degreesPerSecond, quint64 milliseconds); - BluetoothDevice* activeDevice; + BluetoothDevice *m_btDevice; QTimer timer; int m_smaSamples; int m_zeroAltitudeSamples; |