[chirp_devel] [PATCH] [vx8] Fix set valid flag on new mem. #543

Tom Hayward
Mon Feb 11 17:30:53 PST 2013


On Mon, Feb 11, 2013 at 5:28 PM, Dan Smith <dsmith at danplanet.com> wrote:
>> diff -r 6a77491b365f -r 3118ca6e16a6 chirp/vx8.py
>> --- a/chirp/vx8.py    Mon Feb 11 10:08:27 2013 -0800
>> +++ b/chirp/vx8.py    Mon Feb 11 12:40:32 2013 -0800
>> @@ -261,6 +261,7 @@
>>
>>          if not mem.empty and not flag.valid:
>>              _wipe_memory(_mem)
>> +            flag.valid = True
>
> I'm confused. After we wipe it, it's valid?

If you read _wipe_memory(), you'll see it is used to zero the
memory before writing something new to it. So yes, initialize the
space, then mark it valid.

You can discard this patch and use Sean's instead.

Tom



More information about the chirp_devel mailing list