🔨 Build scripts cleanup (#27157)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Andrew 2024-06-14 17:01:34 -04:00 committed by GitHub
parent ae2843940f
commit 959be66cc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 130 additions and 151 deletions

View file

@ -181,7 +181,7 @@ class Protocol(object):
except ReadTimeout:
self.errors += 1
#print("Packetloss detected..")
except serial.serialutil.SerialException:
except serial.SerialException:
return
self.packet_transit = None
@ -201,7 +201,7 @@ class Protocol(object):
def transmit_packet(self, packet):
packet = bytearray(packet)
if(self.simulate_errors > 0 and random.random() > (1.0 - self.simulate_errors)):
if (self.simulate_errors > 0 and random.random() > (1.0 - self.simulate_errors)):
if random.random() > 0.9:
#random data drop
start = random.randint(0, len(packet))