[chirp_devel] [PATCH] [KG-816] File SAVE/RELOAD difficulties Jetstream JT270
Jim Unroe
Mon Jun 1 18:25:18 PDT 2015
On Mon, Jun 1, 2015 at 8:10 PM, Tom Hayward <tom at tomh.us> wrote:
> On Sat, May 30, 2015 at 12:30 PM, Jim Unroe <rock.unroe at gmail.com> wrote:
>> filedata[0x0d70:0x0d80] != "\xff\xff\xff\xff\xff\xff\xff\xff" \
>> "\xff\xff\xff\xff\xff\xff\xff\xff":
>
> In the future, it might be a little easier to read if you write it like this:
>
> filedata[0x0d70:0x0d80] != "\xff" * 16:
>
>
> Tom KD7LXL
Tom,
I appreciate the tip, but you are giving me credit for code that isn't
mine. It has been this way at least as far back as CHIRP v0.3.0.
@classmethod
def match_model(cls, filedata, filename):
if len(filedata) == 8192 and \
filedata[0x60:0x64] != "2009" and \
filedata[0x1f77:0x1f7d] == "\xff\xff\xff\xff\xff\xff" and \
filedata[0x0d70:0x0d80] != "\xff\xff\xff\xff\xff\xff\xff\xff" \
"\xff\xff\xff\xff\xff\xff\xff\xff":
return True
return False
I nervously made my first commit for the uv5r.py driver on 22 December
2012. I'm pretty sure I wasn't making changes to the wouxun.py driver
less then 2 months later. ;-)
Jim KC9HI
More information about the chirp_devel
mailing list