[chirp_devel] Getting copy of written serial data upon read

Dan Smith
Tue Apr 30 16:12:00 PDT 2013


> indata=serial.read(1)
> while indata != "?" or indata != "G"
>     data += indata

That won't do what I think you're intending, but regardless, don't do it
that way. You'll be in an infinite loop forever if the radio stops
responding :)

> in the download function. I'm not sure if that's proper Python
> grammar, but you get the idea. Could be done with if as well, but I
> think your echo_write suggestion is better.

Yeah, it's also more direct, efficient, and the convention in other
places of the code.

Thanks!

-- 
Dan Smith
www.danplanet.com
KK7DS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130430/828c26fe/attachment-0001.bin 


More information about the chirp_devel mailing list