mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-13 17:57:53 -06:00
🔨 Build scripts cleanup (#27157)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
ae2843940f
commit
959be66cc2
41 changed files with 130 additions and 151 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue