Project

General

Profile

New Model #1125 » IntekHR2040.patch

[Intek HR-2040] Initial support for the Intek HR-2040 - Ron Wellsted, 09/18/2013 05:27 AM

View differences:

chirp/anytone.py Fri Sep 13 11:03:07 2013 -0500 → chirp/anytone.py Wed Sep 18 13:14:11 2013 +0100
raise errors.RadioError("Short read from radio")
return data
valid_model = {'QX588UV', 'HR-2040'}
def _ident(radio):
radio.pipe.setTimeout(1)
_echo_write(radio, "PROGRAM")
......
_echo_write(radio, "\x02")
response = radio.pipe.read(16)
_debug(util.hexprint(response))
if response[1:8] != "QX588UV":
if response[1:8] not in valid_model:
print "Response was:\n%s" % util.hexprint(response)
raise errors.RadioError("Unsupported model")
......
@classmethod
def match_model(cls, filedata, filename):
return filedata[0x21:0x28] == "QX588UV"
@directory.register
class IntekHR2040Radio(AnyTone5888UVRadio):
"""Intek HR-2040"""
VENDOR = "Intek"
MODEL = "HR-2040"
@classmethod
def get_experimental_warning(cls):
return "Experimental - Based on the AnyTone 5888UV code"
# This SHOULD be a different model number but at present it returns the same as the AnyTone
# expect this to change in future firmware releases.
@classmethod
def match_model(cls, filedata, filename):
return filedata[0x21:0x28] == "QX588UV"
# return filedata[0x21:0x28] == "HR-2040"
(4-4/6)