[chirp_devel] [PATCH] [KG-UV8D] Add TX Inhibited Channel Support

Jim Unroe
Wed Nov 2 18:11:42 PDT 2016


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1478135417 14400
# Node ID 46c8ed25793cb224da74753153ebca9afad54156
# Parent  c386ef4dc431e5065266de2b163260e6f5637b27
[KG-UV8D] Add TX Inhibited Channel Support

The Wouxun KG-UV8D supports the ability to program channels with
TX disabled. This patch adds support for this feature.

Related to #4175

diff -r c386ef4dc431 -r 46c8ed25793c chirp/drivers/kguv8d.py
--- a/chirp/drivers/kguv8d.py	Tue Nov 01 18:42:18 2016 -0700
+++ b/chirp/drivers/kguv8d.py	Wed Nov 02 21:10:17 2016 -0400
@@ -475,7 +475,7 @@
         rf.valid_modes = ["FM", "NFM"]
         rf.valid_power_levels = self.POWER_LEVELS
         rf.valid_name_length = 8
-        rf.valid_duplexes = ["", "+", "-", "split"]
+        rf.valid_duplexes = ["", "-", "+", "split", "off"]
         rf.valid_bands = [(134000000, 175000000),  # supports 2m
                           (400000000, 520000000)]  # supports 70cm
         rf.valid_characters = chirp_common.CHARSET_ASCII
@@ -554,7 +554,11 @@
 
         mem.freq = int(_mem.rxfreq) * 10
 
-        if int(_mem.rxfreq) == int(_mem.txfreq):
+        if _mem.txfreq == 0xFFFFFFFF:
+            # TX freq not set
+            mem.duplex = "off"
+            mem.offset = 0
+        elif int(_mem.rxfreq) == int(_mem.txfreq):
             mem.duplex = ""
             mem.offset = 0
         elif abs(int(_mem.rxfreq) * 10 - int(_mem.txfreq) * 10) > 70000000:
@@ -629,7 +633,9 @@
             return
 
         _mem.rxfreq = int(mem.freq / 10)
-        if mem.duplex == "split":
+        if mem.duplex == "off":
+            _mem.txfreq = 0xFFFFFFFF
+        elif mem.duplex == "split":
             _mem.txfreq = int(mem.offset / 10)
         elif mem.duplex == "off":
             for i in range(0, 4):



More information about the chirp_devel mailing list