From bd59ec97c631d764177ade509c20cb194fe0b077 Mon Sep 17 00:00:00 2001 From: daid Date: Tue, 25 Feb 2014 11:17:05 +0100 Subject: [PATCH] Flush the in/output before programming firmware. --- Cura/avr_isp/stk500v2.py | 2 ++ 1 file changed, 2 insertions(+) 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() -- 2.30.2