<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If STEP_LIST is a sequence of the radio memory values 0x0, 0x10, 0x20, etc., then<div><span class="Apple-tab-span" style="white-space:pre">        </span>map(lambda x: x/16, STEP_LIST)</div>will return a sequence [0, 1, 2, …]<div>Is that what you're looking for?</div><div><br></div><div> -Les</div><div><div><br></div><div><br><div><div><div>On 13 Jan 2013, at 6:29, Jim Unroe <<a href="mailto:rock.unroe@gmail.com">rock.unroe@gmail.com</a>> wrote:</div><blockquote type="cite"><br><div class="gmail_quote">On Sat, Jan 12, 2013 at 8:38 PM, Andrew Errington <span dir="ltr"><<a href="mailto:erringtona@gmail.com" target="_blank">erringtona@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
</div></div>What do you need to do? If you are writing software and you need to convert<br>
0, 1, 2, 3 ... 14 to 0x00, 0x10, 0x20, 0x30 ... 0xE0 then just multiply by<br>
16.<br>
<br>
0 x 16 = 0 = 0x00<br>
1 x 16 = 16 = 0x10<br>
2 x 16 = 32 = 0x20<br>
3 x 16 = 48 = 0x30<br>
.<br>
.<br>
.<br>
14 x 16 = 224 = 0xE0<br>
<br>
Is that what you need to do, or do I misunderstand your question?<br>
<br></blockquote></div>Andrew,<br><br>I want to use this in a scenario similar to this to create a menu setting item for 'step'<br><br> rs = RadioSetting("vfoa.step", "VFO A Tuning Step",<br>
RadioSettingValueList(STEP_LIST,<br> STEP_LIST[self._memobj.vfoa.step]))<br> vfopresets.append(rs)<br><br>The structure 'vfoa' has 'step' in it but the above doesn't work (out of range) because of the difference between the 0, 1, 2, 3 ... 14 vs. the 0x00, 0x01, 0x02, 0x03 ... 0xE0 (or 0, 16, 32, 48 ... 224).<br>
<br>This is probably simple to implement but right now I can't see the forest for the trees.<br><br>73,<br>Jim<br></blockquote></div><br></div></div></div></body></html>