[chirp_devel] [PATCH] [KG-UVxD] Fix dtcs pol get for cross tone

Marco Filippi IZ3GME
Sun Mar 9 09:32:21 PDT 2014


# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1394382139 -3600
#      Sun Mar 09 17:22:19 2014 +0100
# Node ID d1081e1a2f00df31c29dc0278d3e64f1e5fe8e9a
# Parent  b6ca836716a933248e18fedf10ed8c45f0187848
[KG-UVxD] Fix dtcs pol get for cross tone

Dtcs pol get was working only for "DTCS" tone mode, it has to be considered also
for cross tone modes.

Fix #1479

diff -r b6ca836716a9 -r d1081e1a2f00 chirp/wouxun.py
--- a/chirp/wouxun.py	Sun Mar 02 19:37:13 2014 -0500
+++ b/chirp/wouxun.py	Sun Mar 09 17:22:19 2014 +0100
@@ -673,6 +673,7 @@
             pol = (val & 0x8000) and "R" or "N"
             return code, pol
 
+        tpol = False
         if _mem.tx_tone != 0xFFFF and _mem.tx_tone > 0x2800:
             tcode, tpol = _get_dcs(_mem.tx_tone)
             mem.dtcs = tcode
@@ -683,6 +684,7 @@
         else:
             txmode = ""
 
+        rpol = False
         if _mem.rx_tone != 0xFFFF and _mem.rx_tone > 0x2800:
             rcode, rpol = _get_dcs(_mem.rx_tone)
             mem.rx_dtcs = rcode
@@ -703,8 +705,8 @@
             mem.tmode = "Cross"
             mem.cross_mode = "%s->%s" % (txmode, rxmode)
 
-        if mem.tmode == "DTCS":
-            mem.dtcs_polarity = "%s%s" % (tpol, rpol)
+        # always set it even if no dtcs is used
+        mem.dtcs_polarity = "%s%s" % (tpol or "N", rpol or "N")
 
         if os.getenv("CHIRP_DEBUG"):
             print "Got TX %s (%i) RX %s (%i)" % (txmode, _mem.tx_tone,



More information about the chirp_devel mailing list