changed len constraint
This commit is contained in:
1 parent
e4d10a9f13
commit
ea3879fbde
1 file changed
+2
-2
@@ -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()
|
||||
Reference in new issue
Block a user