[chirp_devel] [PATCH] [th9800] initialize memories properly if previously inactive #2187
Dan Smith
Sat Jan 17 10:00:16 PST 2015
> # HG changeset patch
> # User Jens Jensen <af5mi at yahoo.com>
> # Date 1421511054 21600
> # Sat Jan 17 10:10:54 2015 -0600
> # Node ID e09db41200fd27c4b1638f6fe59caef168f21164
> # Parent f0823e0e20ab9a37a9261722b08de260a4fc86e7
> [th9800] initialize memories properly if previously inactive #2187
>
> Memories were not getting initialized if previously unused, causing exceptions
> This will additionally initialize memory if it was previously marked inactive
> in the radio.
I applied this, thanks. However,
> diff -r f0823e0e20ab -r e09db41200fd chirp/th9800.py
> --- a/chirp/th9800.py Sat Jan 17 09:33:28 2015 -0600
> +++ b/chirp/th9800.py Sat Jan 17 10:10:54 2015 -0600
> @@ -322,15 +322,17 @@
>
> def set_memory(self, mem):
> _mem = self._memobj.memory[mem.number - 1]
> +
> + _prev_active = self.get_chan_active(mem.number)
> self.set_chan_active(mem.number, not mem.empty)
> + if mem.empty or not _prev_active:
> + if CHIRP_DEBUG:
> + print "initializing memory channel %d" % mem.number
> + _mem.set_raw(BLANK_MEMORY)
> +
Looks like this file is using two-space indents, which I didn't realize
before. I can fix it, but don't want to stomp on what you are doing. At
some point, can you fix that in a patch so we're consistent?
Thanks!
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20150117/f7897495/attachment-0001.bin
More information about the chirp_devel
mailing list