<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:12pt"><div><span>For me I was manipulating this inside of bank class code, from Banks view of UI. When I changed to using an array inside a struct, it worked, and the exception went away.</span></div><div><br></div> <div style="font-family: tahoma, 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Marco Filippi IZ3GME <iz3gme.marco@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> chirp_devel@intrepid.danplanet.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, September 8, 2013 10:34 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [chirp_devel] [PATCH] [kg-uv6] Fix fm preset locations and
numbers<br> </font> </div> <div class="y_msg_container"><br>
# HG changeset patch<br># User Marco Filippi <<a ymailto="mailto:iz3gme.marco@gmail.com" href="mailto:iz3gme.marco@gmail.com">iz3gme.marco@gmail.com</a>><br># Date 1378654461 -7200<br># Node ID 2fdf058355458deb31f1fcb711437ee71dd24ba1<br># Parent b5cced8e6c9da6d5ed82200cd62021fca74e926e<br>[kg-uv6] Fix fm preset locations and numbers<br>Fix #1115<br><br>diff -r b5cced8e6c9d -r 2fdf05835545 chirp/wouxun.py<br>--- a/chirp/wouxun.py ven set 06 22:40:43 2013 -0500<br>+++ b/chirp/wouxun.py dom set 08 17:34:21 2013 +0200<br>@@ -646,7 +646,7 @@<br> u8 pad[2];<br> } vfo_settings[2];<br> <br>- #seekto 0x0f80;<br>+ #seekto 0x0f82;<br> u16 fm_presets_0[9];<br> <br> #seekto 0x0ff0;<br>@@ -675,7 +675,7 @@<br>
u8 pad[9];<br> } vfo_offset[2];<br> <br>- #seekto 0x1f80;<br>+ #seekto 0x1f82;<br> u16 fm_presets_1[9];<br> """<br> <br>@@ -919,23 +919,25 @@<br> <br> for i in range(0, 9):<br> if self._memobj.fm_presets_0[i] != 0xFFFF:<br>- rs = RadioSetting("fm_presets_0_%1i" % i, "Bank 0 Location %i" % i,<br>- RadioSettingValueBoolean(True),<br>- RadioSettingValueFloat(76, 108, self._memobj.fm_presets_0[i]/10.0+76, 0.1,
1))<br>+ used = True<br>+ preset = self._memobj.fm_presets_0[i]/10.0+76<br> else:<br>- rs = RadioSetting("fm_presets_0_%1i" % i, "Bank 0 Location %i" % i,<br>- RadioSettingValueBoolean(False),<br>- RadioSettingValueFloat(76, 108, 76, 0.1, 1))<br>+ used = False<br>+ preset = 76<br>+ rs = RadioSetting("fm_presets_0_%1i" % i, "Team 1 Location %i" % (i+1),<br>+
RadioSettingValueBoolean(used),<br>+ RadioSettingValueFloat(76, 108, preset, 0.1, 1))<br> fm_preset.append(rs)<br> for i in range(0, 9):<br> if self._memobj.fm_presets_1[i] != 0xFFFF:<br>- rs = RadioSetting("fm_presets_1_%1i" % i, "Bank 1 Location %i" % i,<br>- RadioSettingValueBoolean(True),<br>- RadioSettingValueFloat(76, 108, self._memobj.fm_presets_1[i]/10.0+76, 0.1, 1))<br>+ used =
True<br>+ preset = self._memobj.fm_presets_1[i]/10.0+76<br> else:<br>- rs = RadioSetting("fm_presets_1_%1i" % i, "Bank 1 Location %i" % i,<br>- RadioSettingValueBoolean(False),<br>- RadioSettingValueFloat(76, 108, 76, 0.1, 1))<br>+ used = False<br>+ preset = 76<br>+ rs = RadioSetting("fm_presets_1_%1i" % i, "Team 2 Location %i" % (i+1),<br>+
RadioSettingValueBoolean(used),<br>+ RadioSettingValueFloat(76, 108, preset, 0.1, 1))<br> fm_preset.append(rs)<br> <br> return top<br>_______________________________________________<br>chirp_devel mailing list<br><a ymailto="mailto:chirp_devel@intrepid.danplanet.com" href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a><br>http://intrepid.danplanet.com/mailman/listinfo/chirp_devel<br>Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers<br><br><br></div> </div> </div> </div></body></html>