examples/bluetooth: In ble_advertising.py, skip appearance if not set.

This commit is contained in:
Jim Mussared 2020-06-17 13:54:31 +10:00 committed by Damien George
parent 5d0be97bd9
commit 07aec4681f
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ def advertising_payload(limited_disc=False, br_edr=False, name=None, services=No
_append(_ADV_TYPE_UUID128_COMPLETE, b)
# See org.bluetooth.characteristic.gap.appearance.xml
_append(_ADV_TYPE_APPEARANCE, struct.pack("<h", appearance))
if appearance:
_append(_ADV_TYPE_APPEARANCE, struct.pack("<h", appearance))
return payload