mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-14 18:28:00 -06:00
serialhdl: Don't open port at 1200 baud
The 1200 baud trick on the Arduino Due does both a reset and an erase. The erase is not desired. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
07a69df62f
commit
e0f275cddf
2 changed files with 10 additions and 10 deletions
|
@ -272,11 +272,11 @@ def stk500v2_leave(ser, reactor):
|
|||
|
||||
# Attempt an arduino style reset on a serial port
|
||||
def arduino_reset(serialport, reactor):
|
||||
# First try opening the port at 1200 baud
|
||||
ser = serial.Serial(serialport, 1200, timeout=0)
|
||||
# First try opening the port at a different baud
|
||||
ser = serial.Serial(serialport, 2400, timeout=0)
|
||||
ser.read(1)
|
||||
reactor.pause(reactor.monotonic() + 0.100)
|
||||
# Then try toggling DTR
|
||||
# Then toggle DTR
|
||||
ser.dtr = True
|
||||
reactor.pause(reactor.monotonic() + 0.100)
|
||||
ser.dtr = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue