diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-10-23 11:19:15 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-10-23 14:17:07 +0300 |
commit | 9e7c2416f4219bf5f817d13a6626fd6f649549c1 (patch) | |
tree | 962c6e45df0d12f7f145ce3f60208bb3d0a7f3b0 /test | |
parent | 1c66a3dbc169c323c0f7ced1bf6bc11553cdaad3 (diff) | |
download | bluez-9e7c2416f4219bf5f817d13a6626fd6f649549c1.tar.gz |
test/example-gatt-server: Don't change measuments if not notifying
This makes it clearer when notifications are actually in effect.
Diffstat (limited to 'test')
-rwxr-xr-x | test/example-gatt-server | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/example-gatt-server b/test/example-gatt-server index 24aaff973..689e86ff7 100755 --- a/test/example-gatt-server +++ b/test/example-gatt-server @@ -401,6 +401,8 @@ class BatteryLevelCharacteristic(Characteristic): { 'Value': [dbus.Byte(self.battery_lvl)] }, []) def drain_battery(self): + if not self.notifying: + return True if self.battery_lvl > 0: self.battery_lvl -= 2 if self.battery_lvl < 0: |