We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb91fcb commit abda3d8Copy full SHA for abda3d8
adafruit_ble/uuid/__init__.py
@@ -49,6 +49,11 @@ def __eq__(self, other):
49
def __str__(self):
50
return str(self.bleio_uuid)
51
52
+ def __bytes__(self):
53
+ b = bytearray(self.bleio_uuid.size // 8)
54
+ self.bleio_uuid.pack_into(b)
55
+ return bytes(b)
56
+
57
def pack_into(self, buffer, offset=0):
58
"""Packs the UUID into the buffer at the given offset."""
59
self.bleio_uuid.pack_into(buffer, offset=offset)
0 commit comments