<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 16, 2014 at 7:00 PM, Jim Unroe <span dir="ltr"><<a href="mailto:rock.unroe@gmail.com" target="_blank">rock.unroe@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class=""><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 5, 2014 at 8:17 PM, Dan Smith <span dir="ltr"><<a href="mailto:dsmith@danplanet.com" target="_blank">dsmith@danplanet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
It also looks like the two radios count their memories differently, one<br>
being from zero and the other from one. In that case, you might just add<br>
a method like this for the uv5:<br>
<br>
def _get_mem(self, number):<br>
return self._memobj.memory[number]<br>
<br>
and then override it in the UV6 class like this:<br>
<br>
def _get_mem(self, number):<br>
return self._memobj.memory[number - 1]<br>
<br>
then in get_memory(), you can do this:<br>
<br>
mem = self._get_mem(number)<br>
<br>
and it will do the right thing in each class.<br></blockquote></div><br></div></div><div class="gmail_extra">Apparently I need to do something similar for set_memory(). I've tried to do it similar to the above but can't quite get it. Here are the original lines...<br>
<br> def set_memory(self, mem):<br> _mem = self._memobj.memory[mem.number]<br><br></div></div></blockquote></div>I think I may have figure it out on my own.<br></div><div class="gmail_extra"><br> def _set_mem(self, number):<br>
return self._memobj.memory[number]<br><br> def set_memory(self, mem):<br> _mem = self._get_mem(mem.number)<br> <br></div><div class="gmail_extra">Jim<br></div></div>