[chirp_devel] [PATCH][UV-5R] Add VFO Frequency Presets to Work Mode Tab [#467]
Andrew Errington
Mon Jan 28 08:24:07 PST 2013
On Mon, 28 Jan 2013 19:33:44 Jim Unroe wrote:
> I'm don't believe I understand what "try with integers" means.
>
> Here's the portion of code that I think the problem is in. More
> specifically the 'def convert_freq_to_bytes(real_freq) part.
>
> + def convert_bytes_to_freq(bytes):
> + real_freq = 0
> + for byte in bytes:
> + real_freq = (real_freq * 10) + byte
> + return real_freq / 100000.0
> +
> + def convert_freq_to_bytes(real_freq):
> + bytes = [ 0 for x in range(0,8) ] # init list with 8 times 0
> + real_freq = int(freq * 100000) # it has to be integer
^^^^
Don't you mean "real_freq" here, not "freq"?
73,
Andrew
More information about the chirp_devel
mailing list