From: daid Date: Tue, 25 Feb 2014 10:17:05 +0000 (+0100) Subject: Flush the in/output before programming firmware. X-Git-Tag: 14.03~24 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bd59ec97c631d764177ade509c20cb194fe0b077;p=cura.git Flush the in/output before programming firmware. --- diff --git a/Cura/avr_isp/stk500v2.py b/Cura/avr_isp/stk500v2.py index e64e1548..56a2223f 100644 --- a/Cura/avr_isp/stk500v2.py +++ b/Cura/avr_isp/stk500v2.py @@ -34,6 +34,8 @@ class Stk500v2(ispBase.IspBase): self.serial.setDTR(0) time.sleep(0.2) + self.serial.flushInput() + self.serial.flushOutput() self.sendMessage([1]) if self.sendMessage([0x10, 0xc8, 0x64, 0x19, 0x20, 0x00, 0x53, 0x03, 0xac, 0x53, 0x00, 0x00]) != [0x10, 0x00]: self.close()