<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im"><br>
> That's it. If I change 5 to 6 and load the image the settings tab is<br>
> available and the PTT-ID #1 is displayed as "1f0202" (6 characters<br>
> long).<br>
<br>
</div>Okay, but just to be clear, the problem is not that it should be be 6<br>
characters long, but that the 1F hex value is being rendered into the<br>
string as two characters, right? I think you know this, but just making<br>
sure...<br></blockquote><div><br></div><div>Right. 1F is the problem.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I'm guessing that 0x1F is a sentinel value, which would be a five-bit<br>
field of all ones (00011111).<br>
<div class="im"><br>
> Plus while testing, I just discovered that the Baofeng software also<br>
> allows *, #, A, B, C and D in addition to the 10 digits.<br>
<br>
</div>Ah, good to know :)<br>
<br>
Will this fix it?<br>
<br>
diff -r b6bca3fba0e9 chirp/uv5r.py<br>
--- a/chirp/uv5r.py Mon Apr 01 17:15:57 2013 -0700<br>
+++ b/chirp/uv5r.py Mon Apr 01 17:30:29 2013 -0700<br>
@@ -1055,12 +1055,13 @@<br>
<br>
dtmf = RadioSettingGroup("dtmf", "DTMF Settings")<br>
group.append(dtmf)<br>
+ dtmfchars = "0123456789*#ABCD"<br>
<br>
for i in range(0, 15):<br>
_codeobj = self._memobj.pttid[i].code<br>
- _code = "".join(["%x" % x for x in _codeobj if int(x) !=<br>
0xFF])<br>
+ _code = "".join([dtmfchars[x] for x in _codeobj if int(x)<br>
< 0x1F]) val = RadioSettingValueString(0, 5, _code, False)<br>
- val.set_charset("0123456789")<br>
+ val.set_charset(dtmfchars)<br>
rs = RadioSetting("pttid/%i.code" % i, "PTT ID Code %i" %<br>
(i + 1), def apply_code(setting, obj):<br>
code = []<br>
<div class=""><div class="h5"><br></div></div></blockquote><br></div><div class="gmail_quote">It allows the characters to be read from the radio. But I get the following error when keying in the extended characters.<br></div>
<pre>Error in setting value: invalid literal for int() with base 10: 'A' <br></pre>or '*' or '#' or 'B' or 'C' or 'D'. Clicking the [OK] button clears the error and enters the character in the field. The extended characters do not get uploaded to the radio.<br>
<br>Jim<br></div></div>