[chirp_devel] [PATCH] [uv-b5] Add 'off' to the list of Duplex options

Jim Unroe
Sat May 4 05:41:01 PDT 2013


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1367671102 14400
# Node ID 5103b9345ba751082b0cdc007b094d445a402f6d
# Parent  ed86c7d025631d37e397016793fad549f3817151
[uv-b5] Add 'off' to the list of Duplex options
so memory channels can programmed with TX inhibited.
#837

diff -r ed86c7d02563 -r 5103b9345ba7 chirp/uvb5.py
--- a/chirp/uvb5.py	Sun Apr 21 19:08:06 2013 -0400
+++ b/chirp/uvb5.py	Sat May 04 08:38:22 2013 -0400
@@ -141,7 +141,7 @@
             raise errors.RadioError("Radio NAK'd block at address 0x%04x" % i)
         do_status(radio, "to", i)
 
-DUPLEX = ["", "-", "+"]
+DUPLEX = ["", "-", "+", 'off']
 CHARSET = "0123456789- ABCDEFGHIJKLMNOPQRSTUVWXYZ_+*"
 SPECIALS = {
     "VFO1": -2,
@@ -265,6 +265,10 @@
         mem.skip = "" if _mem.scanadd else "S"
         mem.power = POWER_LEVELS[_mem.highpower]
 
+        if mem.freq == mem.offset and mem.duplex == "-":
+           mem.duplex = "off"
+           mem.offset = 0
+
         if _nam:
             for char in _nam:
                 try:
@@ -290,6 +294,10 @@
             _mem.set_raw("\xFF" * 16)
             return
 
+        if mem.duplex == "off":
+            mem.offset = mem.freq
+            mem.duplex = "-"
+
         _mem.freq = mem.freq / 10
         _mem.offset = mem.offset / 10
 



More information about the chirp_devel mailing list