[gnoduino] uploader: don't check serial for non-serial programmers when burning a bootloader



commit 4747f3d51d83a32704edd38d18de724ee761ef85
Author: Pascal de Bruijn <pmjdebruijn pcode nl>
Date:   Mon Jun 10 22:17:25 2013 +0200

    uploader: don't check serial for non-serial programmers when burning a bootloader

 src/uploader.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/uploader.py b/src/uploader.py
index 581d834..0f93d2f 100644
--- a/src/uploader.py
+++ b/src/uploader.py
@@ -53,14 +53,14 @@ def burnBootloader(serial, output, notify, id):
        notify.pop(context)
        notify.push(context, _("Burning bootloader..."))
        b = board.Board()
-       port = serial.getConfigSerialPort(notify, output)
-       if port != -1:
-               serial.resetBoard()
-       pgm = programmer.Programmer()
-       """De-fuse and erase board"""
        compline=[i for i in avr_bl]
-       compline.append("-c" + pgm.getProtocol(id))
+       pgm = programmer.Programmer()
        if pgm.getCommunication(id) == 'serial':
+               port = serial.getConfigSerialPort(notify, output)
+               if port != -1:
+                       serial.resetBoard()
+               """De-fuse and erase board"""
+
                port = serial.getConfigSerialPort(notify, output)
                if port == -1:
                        notify.pop(context)
@@ -71,6 +71,7 @@ def burnBootloader(serial, output, notify, id):
                        compline.append("-b" + pgm.getSpeed(id))
        elif pgm.getCommunication(id) == 'usb':
                compline.append("-Pusb")
+       compline.append("-c" + pgm.getProtocol(id))
        compline.append("-p" + b.getBoardMCU(b.getBoard()))
        compline.append("-e")
        if pgm.getForce(id) == 'true':


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]