Maybe I'm missing something. If the user has to enter the frequency as a floating point number, how does storing it as an integer help? When the user's input is changed to and saved as in integer, wouldn't the same error occur? Jim
On Mon, Jan 28, 2013 at 11:24 AM, Andrew Errington erringtona@gmail.comwrote:
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 _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers