[chirp_devel] [PATCH] [KT-8900D] Support Radios With Missing TMR Choice
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1556462057 14400 # Node ID 542a1775314d57f1648dbd8c606bf093b3d48e73 # Parent 2ad6dc187df9237a746aad6fc1fe511a5e04c696 [KT-8900D] Support Radios With Missing TMR Choice
A bug with the TMR feature was discovered during the initial development of this driver. The 15 choices listed in the TMR menu of the radio did not match the 15 choices of same setting in the factory programming software. They each had a choice available that the other did not have. The bug was reported.
Soon after that a pre-production BTech model was received from Baofeng Tech that corrected the TMR menu to have a complete set of 16 choices. It was assumed that the other Vendor/Model variants would receive the same update to the TMR menu. This 16 choice layout is what the initial CHIRP driver for these radios was then based on.
Apparently the bug was not universally fixed in the TMR menu of non-BTech variants so some models continue to ship with the M+A+B+D choice missing from the TMR menu. This patch creates a 15 choice list to be use with color mobile radios that have the M+A+B+D choice missing (such as the QYT KT-7900D and KT-8900D).
#5999
diff -r 2ad6dc187df9 -r 542a1775314d chirp/drivers/btech.py --- a/chirp/drivers/btech.py Sat Apr 20 11:16:18 2019 -0400 +++ b/chirp/drivers/btech.py Sun Apr 28 10:34:17 2019 -0400 @@ -79,9 +79,15 @@ STEPS = [2.5, 5.0, 6.25, 10.0, 12.5, 25.0] LIST_STEP = [str(x) for x in STEPS] LIST_SYNC = ["Off", "AB", "CD", "AB+CD"] -LIST_TMR = ["OFF", "M+A", "M+B", "M+C", "M+D", "M+A+B", "M+A+C", "M+A+D", - "M+B+C", "M+B+D", "M+C+D", "M+A+B+C", "M+A+B+D", "M+A+C+D", - "M+B+C+D", "A+B+C+D"] +# the first 12 TMR choices common to all color display mobile radios +LIST_TMR12 = ["OFF", "M+A", "M+B", "M+C", "M+D", "M+A+B", "M+A+C", "M+A+D", + "M+B+C", "M+B+D", "M+C+D", "M+A+B+C"] +# the 16 choice list for color display mobile radios that correctly implement +# the full 16 TMR choices +LIST_TMR16 = LIST_TMR12 + ["M+A+B+D", "M+A+C+D", "M+B+C+D", "A+B+C+D"] +# the 15 choice list for color mobile radios that are missing the M+A+B+D +# choice in the TMR menu +LIST_TMR15 = LIST_TMR12 + ["M+A+C+D", "M+B+C+D", "A+B+C+D"] LIST_TOT = ["%s sec" % x for x in range(15, 615, 15)] LIST_TXDISP = ["Power", "Mic Volume"] LIST_TXP = ["High", "Low"] @@ -1038,8 +1044,8 @@ if self.COLOR_LCD: tmr = RadioSetting("settings.tmr", "Transceiver multi-receive", RadioSettingValueList( - LIST_TMR, - LIST_TMR[_mem.settings.tmr])) + self.LIST_TMR, + self.LIST_TMR[_mem.settings.tmr])) basic.append(tmr) else: tdr = RadioSetting("settings.tdr", "Transceiver dual receive", @@ -3581,6 +3587,7 @@ """BTECH's Color LCD Mobile and alike radios""" COLOR_LCD = True NAME_LENGTH = 8 + LIST_TMR = LIST_TMR16
def process_mmap(self): """Process the mem map into the mem object""" @@ -3679,6 +3686,7 @@ VENDOR = "QYT" MODEL = "KT7900D" BANDS = 4 + LIST_TMR = LIST_TMR15 _vhf_range = (136000000, 175000000) _220_range = (200000000, 271000000) _uhf_range = (400000000, 481000000) @@ -3695,6 +3703,7 @@ VENDOR = "QYT" MODEL = "KT8900D" BANDS = 2 + LIST_TMR = LIST_TMR15 _vhf_range = (136000000, 175000000) _uhf_range = (400000000, 481000000) _magic = MSTRING_KT8900D
participants (1)
-
Jim Unroe