summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/bluetoothdataprovider.h
diff options
context:
space:
mode:
Diffstat (limited to 'tradeshow/iot-sensortag/bluetoothdataprovider.h')
-rw-r--r--tradeshow/iot-sensortag/bluetoothdataprovider.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/tradeshow/iot-sensortag/bluetoothdataprovider.h b/tradeshow/iot-sensortag/bluetoothdataprovider.h
index 5f39b4f..5c28725 100644
--- a/tradeshow/iot-sensortag/bluetoothdataprovider.h
+++ b/tradeshow/iot-sensortag/bluetoothdataprovider.h
@@ -55,12 +55,13 @@
#include <QQmlEngine>
#include <QJSEngine>
#include <QTimer>
+#include <QBluetoothDeviceInfo>
class BluetoothDataProvider : public SensorTagDataProvider
{
Q_OBJECT
public:
- BluetoothDataProvider(QString id, QObject* parent = 0);
+ BluetoothDataProvider(const QBluetoothDeviceInfo &id, QObject *parent = 0);
virtual ~BluetoothDataProvider();
@@ -69,9 +70,8 @@ public:
QString sensorType() const;
QString versionString() const;
- void bindToDevice(BluetoothDevice *device);
void unbindDevice();
- BluetoothDevice* device();
+ BluetoothDevice *device();
public slots:
void startServiceScan();
@@ -80,7 +80,7 @@ public slots:
void barometerReceived(double temperature, double barometer);
void humidityReceived(double humidity);
void lightIntensityReceived(double lightIntensity);
- void motionReceived(MotionSensorData &data);
+ void motionReceived(const MotionSensorData &data);
protected:
void reset() override;
@@ -89,6 +89,7 @@ protected:
private:
void updateState();
float countRotationDegrees(double degreesPerSecond, quint64 milliseconds);
+ QBluetoothDeviceInfo m_info;
BluetoothDevice *m_btDevice;
int m_smaSamples;
int m_zeroAltitudeSamples;