[chirp_devel] [PATCH] [th-g71] some fixes to tuning steps and removed mode selections #693

Jens Jensen
Wed Jul 24 10:57:37 PDT 2013


# HG changeset patch
# User Jens Jensen <kd4tjx at yahoo.com>
# Date 1374688604 18000
#      Wed Jul 24 12:56:44 2013 -0500
# Node ID 4dd5c29281ad10c9bd4ea1ed0878f3c59083c24f
# Parent  1435e0908185d481d9933fbe15db25512f6063ad
[th-g71] some fixes to tuning steps and removed mode selections #693

diff -r 1435e0908185 -r 4dd5c29281ad chirp/kenwood_live.py
--- a/chirp/kenwood_live.py	Wed Jul 24 11:20:36 2013 -0500
+++ b/chirp/kenwood_live.py	Wed Jul 24 12:56:44 2013 -0500
@@ -672,6 +672,7 @@
                           (430000000, 450000000)]
         return rf
 
+THG71_STEPS = [ 5, 6.25, 10, 12.5, 15, 20, 25, 30, 50, 100 ]
 @directory.register
 class THG71Radio(TMV7Radio):
     """Kenwood TH-G71"""
@@ -679,10 +680,9 @@
 
     def get_features(self):
         rf = TMV7Radio.get_features(self)
-        rf.has_mode = True
-        rf.valid_modes = [ "FM", "AM" ]
-        #rf.has_tuning_step = True
-        rf.valid_name_length = 7
+        rf.has_tuning_step = True
+        rf.valid_tuning_steps = list(THG71_STEPS)
+        rf.valid_name_length = 6
         rf.has_sub_devices = False
         rf.valid_bands = [(118000000, 174000000),
                           (320000000, 470000000),
@@ -692,7 +692,7 @@
     def _make_mem_spec(self, mem):
         spec = ( \
             "%011i" % mem.freq,
-            "%X" % STEPS.index(mem.tuning_step),
+            "%X" % THG71_STEPS.index(mem.tuning_step),
             "%i" % util.get_dict_rev(DUPLEX, mem.duplex),
             "0",
             "%i" % (mem.tmode == "Tone"),
@@ -709,7 +709,7 @@
         mem = chirp_common.Memory()
         mem.number = int(spec[2])
         mem.freq = int(spec[3])
-        mem.tuning_step = STEPS[int(spec[4], 16)]
+        mem.tuning_step = THG71_STEPS[int(spec[4], 16)]
         mem.duplex = DUPLEX[int(spec[5])]
         if int(spec[7]):
             mem.tmode = "Tone"



More information about the chirp_devel mailing list