fix(rx): minor fixes and improvements
This commit is contained in:
@@ -14,12 +14,14 @@ async def tcp_client():
|
||||
port = 50002
|
||||
reader, _ = await asyncio.open_connection(
|
||||
'127.0.0.1', port)
|
||||
output: list[tuple[Onbeat_Header, list[int]]] = []
|
||||
# output: list[tuple[Onbeat_Header, list[int]]] = []
|
||||
output: list[list[int]] = []
|
||||
packet_loss = 0
|
||||
while message := await reader.read(PACKET_LEN):
|
||||
try:
|
||||
received = framing.decode_packet([i for i in message])
|
||||
output.append(received)
|
||||
output.append([i for i in message])
|
||||
print("pkt received")
|
||||
if received[0].pkt_len == 0:
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user