> I'm working on adding support for a new radio, the Ritron RTX-450.Cool!
> It's a commercial radio, but with a bit of VCO tinkering works in the
> ham bands.
Yeah, so those sorts of cables "echo" because of the unified TX/RX
> I started with template.py, and use uv5r.py as a reference, since I
> have one of those as well. So far, I've mapped out the memory and
> established communication with the radio, but I'm having a problem
> when I read the data. To establish communication, I first send a
> series of "?", followed by a "G". As soon as the radio receives the
> G, it starts sending data. What's happening in chirp, though, is when
> I do the serial.read(1), I'm getting the sent data back and then the
> radio data, as if the buffer doesn't clear. This uses an Icom OPC-478
> style cable, where RX and TX are simply wire-OR'd together, so that
> does make sense. I should mention that this cable works fine with the
> OE software. Do I just need to look for the sent string in the
> response and filter it out, or is there a better way to handle this?
> I tried inserting serial.flush() after serial.write("G"), but when
> stepping through the program that seemed to do nothing.
line. So, the best way to hand that is something like:
def _echo_write(radio, data):
radio.pipe.write(data)
radio.pipe.read(len(data))
and use _echo_write(radio, "foo") instead of radio.pipe.write("foo") in
your communication. Various permutations of the above are used in
drivers having to deal with this sort of behavior.
--
Dan Smith
www.danplanet.com
KK7DS
_______________________________________________
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