[chirp_devel] [PATCH] [th9800] initialize memories properly if previously inactive #2187

Jens Jensen
Sat Jan 17 10:31:33 PST 2015


ok so i guess pep8 says 4 space tab and 79 line length, ok will change sublime to this for future patches...


> On Jan 17, 2015, at 12:00 PM, Dan Smith <dsmith at danplanet.com> wrote:
> 
>> # 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
> 
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers




More information about the chirp_devel mailing list