From e0f275cddf55fb1afd21bb66c22e3c2a25d8d247 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 12 Oct 2017 21:21:49 -0400 Subject: 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 --- klippy/serialhdl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'klippy/serialhdl.py') diff --git a/klippy/serialhdl.py b/klippy/serialhdl.py index 8d6d6a7f..e7e35bf8 100644 --- a/klippy/serialhdl.py +++ b/klippy/serialhdl.py @@ -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 -- cgit v1.2.3-70-g09d2