[chirp_devel] [PATCH] [uv-b5] Add 'off' to the list of Duplex options
Dan Smith
Sat May 4 13:55:20 PDT 2013
> @@ -290,6 +294,10 @@
> _mem.set_raw("\xFF" * 16)
> return
>
> + if mem.duplex == "off":
> + mem.offset = mem.freq
> + mem.duplex = "-"
> +
This modifies the object that was being passed in, which is "bad". It
won't technically hurt anything when using the GUI, but it could have
other ramifications if the driver is used for something else.
Instead, can you just handle this near where the _mem object is
changed, like this:
if mem.duplex == "off":
_mem.duplex = DUPLEX.index("-")
_mem.offset = _mem.freq
else:
_mem.offset = mem.offset / 10
_mem.duplex = DUPLEX.index(mem.duplex)
--
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/20130504/ad5cf953/attachment-0001.bin
More information about the chirp_devel
mailing list