[chirp_devel] [PATCH] fix bad cable errors for some users on upload #1397

Jens Jensen
Tue Feb 4 04:47:12 PST 2014


# HG changeset patch
# User Jens Jensen <kd4tjx at yahoo.com>
# Date 1391518017 21600
# Node ID 7ed1f8fad43b085b2339ffccafb17fcf0edbd446
# Parent  db80e2e04c0e628bcd66f75d01f2a07a56ac16fc
fix bad cable errors for some users on upload #1397

some users are seeing bad cable errors on upload, which may be related to
changes made in #1187 for ft-90 to open port before pre_upload prompt.
now making this an optional behavior (defaults to showing prompt first)
ft-90 will use this optional behavior to open the port before showing prompt.

diff -r db80e2e04c0e -r 7ed1f8fad43b chirp/chirp_common.py
--- a/chirp/chirp_common.py	Sun Jan 26 16:16:02 2014 -0500
+++ b/chirp/chirp_common.py	Tue Feb 04 06:46:57 2014 -0600
@@ -650,6 +650,7 @@
     experimental = None
     pre_download = None
     pre_upload = None
+    open_port_before_upload_prompt = False
 
 
 BOOLEAN = [True, False]
diff -r db80e2e04c0e -r 7ed1f8fad43b chirp/ft90.py
--- a/chirp/ft90.py	Sun Jan 26 16:16:02 2014 -0500
+++ b/chirp/ft90.py	Tue Feb 04 06:46:57 2014 -0600
@@ -199,6 +199,7 @@
             3. Replace mic with PC programming cable.
             4. Press the [DISP/SS] key
                 ("R" will appear on the lower left of LCD)."""))
+        rp.open_port_before_upload_prompt = True
         return rp
 
     @classmethod
diff -r db80e2e04c0e -r 7ed1f8fad43b chirpui/mainapp.py
--- a/chirpui/mainapp.py	Sun Jan 26 16:16:02 2014 -0500
+++ b/chirpui/mainapp.py	Tue Feb 04 06:46:57 2014 -0600
@@ -655,6 +655,11 @@
         d.destroy()
         if not settings:
             return
+        prompts = radio.get_prompts()
+
+        if prompts.open_port_before_upload_prompt == True:
+            print "Opening port before pre_upload prompt."
+            self._show_instructions(radio, prompts.pre_upload)
 
         if isinstance(radio, chirp_common.ExperimentalRadio) and \
                 not self._confirm_experimental(radio.__class__):
@@ -673,7 +678,9 @@
             d.destroy()
             return
 
-        self._show_instructions(radio, radio.get_prompts().pre_upload)
+        if prompts.open_port_before_upload_prompt == False:
+            print "Opening port after pre_upload prompt."
+            self._show_instructions(radio, prompts.pre_upload)
 
         radio.set_pipe(ser)
 



More information about the chirp_devel mailing list