Tidy up broadcast in python client

This commit is contained in:
zvecr
2023-08-29 02:36:21 +01:00
parent e9206d2b16
commit 87fd4b42f5
4 changed files with 19 additions and 4 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ from typing import Optional
from struct import pack, unpack
from platform import platform
from .types import XAPSecureStatus, XAPFlags, XAPRequest, XAPResponse
from .types import XAPSecureStatus, XAPFlags, XAPRequest, XAPResponse, XAPBroadcast
from .routes import XAPRoutes, XAPRouteError
@@ -116,8 +116,8 @@ class XAPDeviceBase:
while not hasattr(event, '_ret'):
event.wait(timeout=0.25)
r = XAPResponse.from_bytes(event._ret)
return (r.flags, r.data[:r.length])
r = XAPBroadcast.from_bytes(event._ret)
return (r.event, r.data[:r.length])
class XAPDevice(XAPDeviceBase):