From 9e7c2416f4219bf5f817d13a6626fd6f649549c1 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 23 Oct 2017 11:19:15 +0300 Subject: test/example-gatt-server: Don't change measuments if not notifying This makes it clearer when notifications are actually in effect. --- test/example-gatt-server | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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: -- cgit v1.2.1