19 Jan
2013
19 Jan
'13
4:32 p.m.
Since you have to do this twice, I'd like you to make it a helper function, like this:
def convert_bytes_to_freq(bytes): real_freq = 0 for byte in self._memobj.vfob.freq: real_freq = (real_freq * 10) + byte return real_freq / 1000.0
I think I have it working for the 'get' side. I have a problem with the 'helper function' code. As it is written above, it is specific to 'vfob' (self._memobj.vfob.freq). Is there a simple way to make it for this one block of code work for both VFOs? Also, where is the best place to put this 'helper function'? I currently have it just above my code for the menu selection.
Jim