changed len constraint
This commit is contained in:
parent
e4d10a9f13
commit
ea3879fbde
4
main.py
4
main.py
|
@ -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()
|
Loading…
Reference in New Issue