diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-12-04 13:25:06 +0100 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-12-04 16:08:11 +0100 |
commit | d21201f0536230848e419b71bdd2d025b3ae1468 (patch) | |
tree | ffc5eaf9fbaf18b80fd9f61aa12aad665a2d9746 /src/bluetooth | |
parent | 1169df5311cf4f3c13d232ed2cba810725877e08 (diff) |
QLowEnergyCharacteristic - cached values (OS X and iOS)
Cache a characteristic's value in update/write notification only
if characteristic has a 'Read' property.
Change-Id: Idc705e0c4f2ee704a80bf37b4e59e1dd09ca9e4f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_osx.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bluetooth/qlowenergycontroller_osx.mm b/src/bluetooth/qlowenergycontroller_osx.mm index 48e144cc..ea22ac36 100644 --- a/src/bluetooth/qlowenergycontroller_osx.mm +++ b/src/bluetooth/qlowenergycontroller_osx.mm @@ -328,7 +328,9 @@ void QLowEnergyControllerPrivateOSX::characteristicWriteNotification(QLowEnergyH return; } - updateValueOfCharacteristic(charHandle, value, false); + if (characteristic.properties() & QLowEnergyCharacteristic::Read) + updateValueOfCharacteristic(charHandle, value, false); + emit service->characteristicWritten(characteristic, value); } @@ -354,7 +356,9 @@ void QLowEnergyControllerPrivateOSX::characteristicUpdateNotification(QLowEnergy return; } - updateValueOfCharacteristic(charHandle, value, false); + if (characteristic.properties() & QLowEnergyCharacteristic::Read) + updateValueOfCharacteristic(charHandle, value, false); + emit service->characteristicChanged(characteristic, value); } |