[gnoduino] uploader: we don't want to keep shift pressed until avrdude is run
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] uploader: we don't want to keep shift pressed until avrdude is run
- Date: Tue, 11 Jun 2013 06:56:37 +0000 (UTC)
commit 6b44010324b0c48a1cbc753368ce556fd42f06ca
Author: Pascal de Bruijn <pmjdebruijn pcode nl>
Date: Mon Jun 10 22:30:36 2013 +0200
uploader: we don't want to keep shift pressed until avrdude is run
src/ui.py | 4 +++-
src/uploader.py | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/ui.py b/src/ui.py
index 5b21387..c891ff8 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -284,12 +284,14 @@ def compile(widget, data=file):
return obj
def upload(widget, serial, data=file):
+ # we need to save the state of config.force_protocol when this function is invoked
+ force_protocol = config.force_protocol
obj = compile(widget, data)
if obj == -1: return
while (gtk.events_pending()):
gtk.main_iteration()
startSpinner()
- uploader.upload(obj, serial, tw, sb)
+ uploader.upload(obj, serial, tw, sb, force_protocol)
stopSpinner()
def butSave(widget, data=None):
diff --git a/src/uploader.py b/src/uploader.py
index 0f93d2f..502a11c 100644
--- a/src/uploader.py
+++ b/src/uploader.py
@@ -128,7 +128,7 @@ def burnBootloader(serial, output, notify, id):
misc.printMessageLn(output, \
"Burn OK.");
-def upload(obj, serial, output, notify):
+def upload(obj, serial, output, notify, force_protocol):
p = prefs.preferences()
pgm = programmer.Programmer()
context = notify.get_context_id("main")
@@ -141,7 +141,7 @@ def upload(obj, serial, output, notify):
if protocol == "stk500": protocol = "stk500v1"
# if we do not get any protocol back probably means board doesn't
# enforce any particular programmer
- if protocol == "" or config.force_protocol is True:
+ if protocol == "" or force_protocol is True:
#try selected programmer (via menu)
protocol = pgm.getProtocol(pgm.getProgrammer())
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]