mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-25 07:34:29 +08:00
Merge pull request #4825 from Frischid/patch-2
Update AutoDetectBaudJob.py
This commit is contained in:
commit
f7ffb3ae69
@ -72,9 +72,9 @@ class AutoDetectBaudJob(Job):
|
||||
|
||||
while timeout_time > time():
|
||||
line = serial.readline()
|
||||
if b"ok " in line and b"T:" in line:
|
||||
if b"ok" in line and b"T:" in line:
|
||||
successful_responses += 1
|
||||
if successful_responses >= 3:
|
||||
if successful_responses >= 1:
|
||||
self.setResult(baud_rate)
|
||||
Logger.log("d", "Detected baud rate {baud_rate} on serial {serial} on retry {retry} with after {time_elapsed:0.2f} seconds.".format(
|
||||
serial = self._serial_port, baud_rate = baud_rate, retry = retry, time_elapsed = time() - start_timeout_time))
|
||||
|
Loading…
x
Reference in New Issue
Block a user