[chirp_devel] [PATCH 1 of 3] [thd72] Add live driver for Kenwood TH-D72 and disable broken clone driver
Tom Hayward
Tue Mar 20 18:58:53 PDT 2012
# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1331766827 21600
# Node ID 4a424067aa620bd2c1b288bdb8b20f6576cf6127
# Parent d2c57a9b04bae58dc3ff8094b040597148c80ca3
[thd72] Add live driver for Kenwood TH-D72 and disable broken clone driver.
diff -r d2c57a9b04ba -r 4a424067aa62 chirp/kenwood_live.py
--- a/chirp/kenwood_live.py Tue Mar 20 19:36:57 2012 -0600
+++ b/chirp/kenwood_live.py Wed Mar 14 17:13:47 2012 -0600
@@ -612,6 +612,63 @@
return spec
@directory.register
+class THD72Radio(TMD710Radio):
+ MODEL = "TH-D72"
+ HARDWARE_FLOW = True
+
+ def _parse_mem_spec(self, spec):
+ mem = chirp_common.Memory()
+
+ mem.number = int(spec[0])
+ mem.freq = int(spec[1])
+ mem.tuning_step = D710_STEPS[int(spec[2], 16)]
+ mem.duplex = D710_DUPLEX[int(spec[3])]
+ # Reverse
+ if int(spec[5]):
+ mem.tmode = "Tone"
+ elif int(spec[6]):
+ mem.tmode = "TSQL"
+ elif int(spec[7]):
+ mem.tmode = "DTCS"
+ mem.rtone = chirp_common.TONES[int(spec[9])]
+ mem.ctone = chirp_common.TONES[int(spec[10])]
+ mem.dtcs = chirp_common.DTCS_CODES[int(spec[11])]
+ mem.offset = int(spec[13])
+ mem.mode = D710_MODES[int(spec[14])]
+ # TX Frequency
+ if int(spec[15]):
+ mem.duplex = "split"
+ mem.offset = int(spec[15])
+ # Lockout
+ mem.skip = D710_SKIP[int(spec[17])] # Memory Lockout
+
+ return mem
+
+ def _make_mem_spec(self, mem):
+ print "Index %i for step %.2f" % (chirp_common.TUNING_STEPS.index(mem.tuning_step), mem.tuning_step)
+ spec = ( \
+ "%010i" % mem.freq,
+ "%X" % D710_STEPS.index(mem.tuning_step),
+ "%i" % (0 if mem.duplex == "split" else D710_DUPLEX.index(mem.duplex)),
+ "0", # Reverse
+ "%i" % (mem.tmode == "Tone" and 1 or 0),
+ "%i" % (mem.tmode == "TSQL" and 1 or 0),
+ "%i" % (mem.tmode == "DTCS" and 1 or 0),
+ "0",
+ "%02i" % (chirp_common.TONES.index(mem.rtone)),
+ "%02i" % (chirp_common.TONES.index(mem.ctone)),
+ "%03i" % (chirp_common.DTCS_CODES.index(mem.dtcs)),
+ "0",
+ "%08i" % (0 if mem.duplex == "split" else mem.offset), # Offset
+ "%i" % D710_MODES.index(mem.mode),
+ "%010i" % (mem.offset if mem.duplex == "split" else 0), # TX Frequency
+ "0", # Unknown
+ "%i" % D710_SKIP.index(mem.skip), # Memory Lockout
+ )
+
+ return spec
+
+ at directory.register
class TMV71Radio(TMD710Radio):
MODEL = "TM-V71"
diff -r d2c57a9b04ba -r 4a424067aa62 chirp/thd72.py
--- a/chirp/thd72.py Tue Mar 20 19:36:57 2012 -0600
+++ b/chirp/thd72.py Wed Mar 14 17:13:47 2012 -0600
@@ -160,7 +160,9 @@
EXCH_W = "W\x00\x00\x00\x00"
- at directory.register
+# Uploads result in "MCP Error" and garbage data in memory
+# Clone driver disabled in favor of error-checking live driver.
+#@directory.register
class THD72Radio(chirp_common.CloneModeRadio):
BAUD_RATE = 9600
VENDOR = "Kenwood"
More information about the chirp_devel
mailing list