summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlvar Penning <post@0x21.biz>2020-05-20 22:44:44 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-05-21 09:21:17 -0700
commit440b07fab1d7a27ed42dae40c9586a1bdd950104 (patch)
tree0e0d480d65264045637bc435dc0967e83d2f4946 /test
parent58f2fcdc79d812755f5d92adbb9fdcc492fd75ee (diff)
downloadbluez-440b07fab1d7a27ed42dae40c9586a1bdd950104.tar.gz
test/example-advertisement: Fix include_tx_power
Adding the Tx Power Level is no longer done via IncludeTxPower, but via the tx-power value in the Includes array. The previous code did not throw an error, but neither led to the insertion of the value. As a result of this change, include_tx_power now adds the Tx Power Level again.
Diffstat (limited to 'test')
-rwxr-xr-xtest/example-advertisement6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/example-advertisement b/test/example-advertisement
index f116893b6..96e410683 100755
--- a/test/example-advertisement
+++ b/test/example-advertisement
@@ -57,7 +57,7 @@ class Advertisement(dbus.service.Object):
self.solicit_uuids = None
self.service_data = None
self.local_name = None
- self.include_tx_power = None
+ self.include_tx_power = False
self.data = None
dbus.service.Object.__init__(self, bus, self.path)
@@ -78,8 +78,8 @@ class Advertisement(dbus.service.Object):
signature='sv')
if self.local_name is not None:
properties['LocalName'] = dbus.String(self.local_name)
- if self.include_tx_power is not None:
- properties['IncludeTxPower'] = dbus.Boolean(self.include_tx_power)
+ if self.include_tx_power:
+ properties['Includes'] = dbus.Array(["tx-power"], signature='s')
if self.data is not None:
properties['Data'] = dbus.Dictionary(