diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2017-02-14 14:15:15 +0100 |
---|---|---|
committer | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-14 14:15:03 +0000 |
commit | cacd82b316c8632edde4c37e92d0c0e9747bf5d6 (patch) | |
tree | d76bd4e0a3f694f328ee83ed69ff23ae384e771f /tradeshow/iot-sensortag/bluetoothdevice.h | |
parent | 261d5018ac2990acc4739895e29f86c8d94b62a5 (diff) |
iot-sensortag: Use dedicated slots for characteristic changes
By using a dedicated slot for each kind of sensor we can avoid
one indirection and get rid of the characteristic handle members.
Change-Id: I5da16fd4fab55c4085aa1ed141b69a3c442b8fb3
Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/bluetoothdevice.h')
-rw-r--r-- | tradeshow/iot-sensortag/bluetoothdevice.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tradeshow/iot-sensortag/bluetoothdevice.h b/tradeshow/iot-sensortag/bluetoothdevice.h index c093006..39a344e 100644 --- a/tradeshow/iot-sensortag/bluetoothdevice.h +++ b/tradeshow/iot-sensortag/bluetoothdevice.h @@ -148,8 +148,16 @@ private slots: void deviceDisconnected(); // QLowEnergyService related - void characteristicsRead(const QLowEnergyCharacteristic &info, - const QByteArray &value); + void updateTemperature(const QLowEnergyCharacteristic &info, + const QByteArray &value); + void updatePressure(const QLowEnergyCharacteristic &info, + const QByteArray &value); + void updateHumidity(const QLowEnergyCharacteristic &info, + const QByteArray &value); + void updateLight(const QLowEnergyCharacteristic &info, + const QByteArray &value); + void updateMotionValue(const QLowEnergyCharacteristic &info, + const QByteArray &value); private: void setState(DeviceState state); @@ -170,11 +178,6 @@ private: QLowEnergyService* humidityService; QLowEnergyService* lightService; QLowEnergyService* motionService; - QLowEnergyHandle irTemperatureHandle; - QLowEnergyHandle baroHandle; - QLowEnergyHandle humidityHandle; - QLowEnergyHandle lightHandle; - QLowEnergyHandle motionHandle; DeviceState m_deviceState; bool m_temperatureMeasurementStarted; bool m_barometerMeasurementStarted; |