[chirp_devel] [PATCH] [vx8] Fix set valid flag on new mem. #543
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1360615232 28800 # Node ID 3118ca6e16a62e2a428d24cad3ae280f6828c3fc # Parent 6a77491b365fc34ba3329c89562d30339492c892 [vx8] Fix set valid flag on new mem. #543
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
if mem.empty and flag.valid and not flag.used: flag.valid = False
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?
On Mon, Feb 11, 2013 at 5:28 PM, Dan Smith dsmith@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
If you read _wipe_memory(), you'll see it is used to zero the memory before writing something new to it.
Oh, heh, I was missing that we fall through there. Guess I should read with more context.
You can discard this patch and use Sean's instead.
Okay, cool.
participants (2)
-
Dan Smith
-
Tom Hayward