[chirp_devel] [PATCH 5 of 7] [thd8102] specify valid cross tone modes
Marco Filippi IZ3GME
Sun Sep 14 03:47:06 PDT 2014
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1410689881 -7200
# dom set 14 12:18:01 2014 +0200
# Node ID ae8f9d0e612c02f988a8dbfd6f12a01cfb447762
# Parent d79ffe469d4c8410e9928a30bf96a1ab13cdee35
[thd8102] specify valid cross tone modes
The list of valid cross tone modes is changed in UI and can change again in the
future, we have to specify the correct list for each radio
side effect of fix for #1901
diff -r d79ffe469d4c -r ae8f9d0e612c chirp/tk8102.py
--- a/chirp/tk8102.py dom set 14 12:11:47 2014 +0200
+++ b/chirp/tk8102.py dom set 14 12:18:01 2014 +0200
@@ -158,6 +158,14 @@
rf.has_rx_dtcs = True
rf.valid_tmodes = ['', 'Tone', 'TSQL', 'DTCS', 'Cross']
rf.valid_modes = MODES
+ rf.valid_cross_modes = [
+ "Tone->Tone",
+ "DTCS->",
+ "->DTCS",
+ "Tone->DTCS",
+ "DTCS->Tone",
+ "->Tone",
+ "DTCS->DTCS"]
rf.valid_power_levels = POWER_LEVELS
rf.valid_skips = ["", "S"]
rf.valid_bands = [self._range]
@@ -194,7 +202,7 @@
code = int("%03o" % (val & 0x07FF))
pol = (val & 0x8000) and "R" or "N"
return code, pol
-
+
if _mem.tx_tone != 0xFFFF and _mem.tx_tone > 0x2800:
tcode, tpol = _get_dcs(_mem.tx_tone)
mem.dtcs = tcode
@@ -330,7 +338,7 @@
_mem.tx_freq = mem.freq / 10
self._set_tone(mem, _mem)
-
+
_mem.highpower = mem.power == POWER_LEVELS[1]
_mem.wide = mem.mode == "FM"
@@ -388,7 +396,7 @@
else:
value = element.value
setattr(obj, setting, value)
-
+
@classmethod
def match_model(cls, filedata, filename):
model = filedata[0x03D1:0x03D5]
More information about the chirp_devel
mailing list