changed len constraint

This commit is contained in:
Paul 2024-01-08 16:52:48 +01:00
parent e4d10a9f13
commit ea3879fbde
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ while True:
packet = None
packet = rfm.receive()
ser_data = bytearray()
while ser.inWaiting() > 0 and len(ser_data) <= 252:
while ser.inWaiting() > 0 and len(ser_data) <= 251:
recieved_byte = ser.read(1)
ser_data += recieved_byte
if ser_data == b'':
@ -38,7 +38,7 @@ while True:
if packet is None:
pass
else:
print(f'Received lora byte: {packet}')
print(f'Received lora data: {packet}')
ser.write(packet)
socat_proc.kill()