Merge upstream changes from Marlin 2.1.2.5
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user