added condition to limit send packet size to 252 bytes

This commit is contained in:
Paul 2024-01-08 16:00:41 +01:00
parent 187390e375
commit e4d10a9f13
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ while True:
packet = None
packet = rfm.receive()
ser_data = bytearray()
while ser.inWaiting() > 0:
while ser.inWaiting() > 0 and len(ser_data) <= 252:
recieved_byte = ser.read(1)
ser_data += recieved_byte
if ser_data == b'':