# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1367671102 14400 # Node ID c2b5a8936b55302d47b6275e002056e7d8d786f1 # 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 c2b5a8936b55 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: @@ -291,13 +295,18 @@ return
_mem.freq = mem.freq / 10 - _mem.offset = mem.offset / 10 + + if mem.duplex == "off": + _mem.duplex = DUPLEX.index("-") + _mem.offset = _mem.freq + else: + _mem.offset = mem.offset / 10 + _mem.duplex = DUPLEX.index(mem.duplex)
tx, rx = chirp_common.split_tone_encode(mem) self._encode_tone(_mem, 'tx', *tx) self._encode_tone(_mem, 'rx', *rx)
- _mem.duplex = DUPLEX.index(mem.duplex) _mem.isnarrow = mem.mode == "NFM" _mem.scanadd = mem.skip == "" _mem.highpower = mem.power == POWER_LEVELS[1]