[chirp_devel] [PATCH 0 of 1 ] Bug 937 Fix (FT-857D crashes) - third try
This is the third try to fix the (radio) bug that have been discovered by Robert. Hopefully this is also the last one, it replace the two previuos patch. Again I suggest we wait for him to confirm this really solve the problem before to commit.
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1372258818 -7200 # Node ID 5cf90be0f2974e46bed1b8406954020d8dfed1d1 # Parent 598c397d39c0ab9366256a4fef6ef9e7d426ec50 [ft8x7] pad labels with blanks the bug seems to be limited to a few production lot of ft857d but padding is safe for all radios in ft8x7 family and it can avoid future problems Fix #937
diff --git a/chirp/ft817.py b/chirp/ft817.py --- a/chirp/ft817.py +++ b/chirp/ft817.py @@ -687,12 +687,11 @@ _mem.rit = 0 # not supported in chirp _mem.freq = mem.freq / 10 _mem.offset = mem.offset / 10 - for i in range(0, min(len(mem.name.rstrip()),8)): - _mem.name[i] = ord(mem.name[i]) - # rfill with 0xff to mimic radio - # "quick&dirty" use of i from previous cicle - for i in range(i+1,8): - _mem.name[i] = 0xff + # there are ft857D that have problems with short labels, see bug #937 + # some of the radio fill with 0xff and some with blanks + # the latter is safe for all ft8x7 radio so why should i do it only for some? + for i in range(0, 8): + _mem.name[i] = ord(mem.name.ljust(8)[i])
for setting in mem.extra: setattr(_mem, setting.get_name(), setting.value)
Ok, I've tested this patch. It successfully pads the 8 character label to spaces thus avoiding the problem with the 0xff padding.
Note: If no label is entered, it will also fill the contents with 8 spaces overwriting what ever was there which I think should be fine. I did check the radio still displays the frequency if there is no tag. (I believe it overwrote before, though it wrote 0xff so it looked like uninitialized memory.)
Thanks Marco!
On 6/26/2013 11:03 AM, Marco Filippi IZ3GME wrote:
This is the third try to fix the (radio) bug that have been discovered by Robert. Hopefully this is also the last one, it replace the two previuos patch. Again I suggest we wait for him to confirm this really solve the problem before to commit.
73 de IZ3GME Marco _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
Thank you Robert!!!
73 de IZ3GME Marco
On 06/26/2013 08:10 PM, Robert Terzi wrote:
Ok, I've tested this patch. It successfully pads the 8 character label to spaces thus avoiding the problem with the 0xff padding.
Note: If no label is entered, it will also fill the contents with 8 spaces overwriting what ever was there which I think should be fine. I did check the radio still displays the frequency if there is no tag. (I believe it overwrote before, though it wrote 0xff so it looked like uninitialized memory.)
Thanks Marco!
participants (4)
-
Dan Smith
-
Marco Filippi IZ3GME
-
Marco IZ3GME
-
Robert Terzi