<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Don't apply this ! It can break support to other radios supported
by this lib!<br>
</p>
<p>Hi Tom, <br>
</p>
<p>I think you don't read the full driver, at the end there is a
section with the specific limits for each radio the lib supports
and all of it's known (to me and by the software) <br>
</p>
<p>So changing the limit in the main class code is discouraged (low
and high variables are updated by the specific radio model/type
class instantiation at the bottom of the file), the right place to
do that is in the specific class instance for the radio type,
please see the bottom of the lib, for the TK-360:</p>
<p>================================<br>
</p>
<p>@directory.register<br>
class TK360_Radio(Kenwood_P60_Radio):<br>
"""Kenwood TK-360 Radios"""<br>
MODEL = "TK-360"<br>
TYPE = "P0360"<br>
VARIANTS = {<br>
"P0360\x24\x00\x00": (4, 450, 470, "F1"),<br>
"P0360\x25\x00\x00": (4, 470, 490, "F2"),<br>
"P0360\x26\x00\x00": (4, 490, 512, "F3"),<br>
"P0360\x23\x00\x00": (4, 406, 430, "F4"),<br>
}</p>
<p>===============================<br>
</p>
<p>As you can see there are 4 variants of this radio and some has
very different band segments, I know that almost all kenwood
radios can work outside the dealer limits, but how far away is the
question.</p>
<p>I follow a policy of just modify the ones that I can confirm by
my/others test, in your image I sport that you has a F1 version
(see attached image, 450 to 470MHz as dealer states) and you have
confirmed that it works down to 440, which is great.</p>
<p>So the right change must be this (and not in the
Kenwood_P60_Radio class):<br>
</p>
<p>================================<br>
</p>
<p>@directory.register<br>
class TK360_Radio(Kenwood_P60_Radio):<br>
"""Kenwood TK-360 Radios"""<br>
MODEL = "TK-360"<br>
TYPE = "P0360"<br>
VARIANTS = {<br>
"P0360\x24\x00\x00": (4, <b>440</b>, 470, "F1"), #
original 450-470<br>
"P0360\x25\x00\x00": (4, 470, 490, "F2"),<br>
"P0360\x26\x00\x00": (4, 490, 512, "F3"),<br>
"P0360\x23\x00\x00": (4, 406, 430, "F4"),<br>
}</p>
<p>===============================<br>
</p>
<p>Now I missed to comment the structure of the data in the file,
and that must confuse you, here it's:</p>
<p>Radio internal ID: (ch_count, lower_edge, upper_edge,
dealer_variant_code) </p>
<p>So for the radio you have it's:</p>
<p>Radio internal ID: "P0360\x24\x00\x00"</p>
<p>Ch count: 4</p>
<p>Lower band edge: 440 (was 450)</p>
<p>Upper band edge: 470</p>
<p>Dealer Variant Code: "F1" <br>
</p>
<p><br>
</p>
<p>Should I patch it with the proper changes or you can fix it?</p>
<p><br>
</p>
<p>73 de Pavel CO7WT<br>
</p>
<br>
<div class="moz-cite-prefix">El 07/04/17 a las 23:07, Tom Hayward
via chirp_devel escribió:<br>
</div>
<blockquote cite="mid:87617be5ce8499147970.1491620871@t4"
type="cite">
<pre wrap=""># HG changeset patch
# User Tom Hayward <a class="moz-txt-link-rfc2396E" href="mailto:tom@tomh.us"><tom@tomh.us></a>
# Date 1491620809 25200
# Fri Apr 07 20:06:49 2017 -0700
# Node ID 87617be5ce849914797040874cb95922c64a712a
# Parent aa35de3cc43ead9e35ecd637525cb4a5dfa9faad
[TK-270] Allow programming Kenwood commercial UHF radios in the 70cm band. #4709
diff -r aa35de3cc43e -r 87617be5ce84 chirp/drivers/tk270.py
--- a/chirp/drivers/tk270.py        Thu Mar 30 15:43:25 2017 -0700
+++ b/chirp/drivers/tk270.py        Fri Apr 07 20:06:49 2017 -0700
@@ -413,14 +413,12 @@
# indentify the radio variant and set the enviroment to it's values
try:
self._upper, low, high, self._kind = self.VARIANTS[rid]
- self._range = [low * 1000000, high * 1000000]
+ self._range = [min(440, low) * 1000000, high * 1000000]
# put the VARIANT in the class, clean the model / CHs / Type
# in the same layout as the KPG program
self._VARIANT = self.MODEL + " [" + str(self._upper) + "CH]: "
- self._VARIANT += self._kind + ", "
- self._VARIANT += str(self._range[0]/1000000) + "-"
- self._VARIANT += str(self._range[1]/1000000) + " Mhz"
+ self._VARIANT += "%s, %d-%d Mhz" % (self._kind, low, high)
# DEBUG
#print self._VARIANT
_______________________________________________
chirp_devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a>
<a class="moz-txt-link-freetext" href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a>
Developer docs: <a class="moz-txt-link-freetext" href="http://chirp.danplanet.com/projects/chirp/wiki/Developers">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a>
</pre>
</blockquote>
<br>
</body>
</html>