sub command enum cleanup

This commit is contained in:
Robert Martin
2020-01-29 13:13:18 +09:00
parent 5b164ee2a1
commit b482e61809
3 changed files with 20 additions and 33 deletions
+2 -2
View File
@@ -60,10 +60,10 @@ class L2CAP_Transport(asyncio.Transport):
return super().get_write_buffer_size()
async def write(self, data: Any) -> None:
if isinstance(data, bytes):
_bytes = data
elif isinstance(data, InputReport):
# set timer byte of input report
data.set_timer(self._input_report_timer)
self._input_report_timer = (self._input_report_timer + 1) % 256
_bytes = bytes(data)
@@ -99,4 +99,4 @@ class L2CAP_Transport(asyncio.Transport):
self._protocol = protocol
def get_protocol(self) -> asyncio.BaseProtocol:
return self._protocol
return self._protocol