Project

General

Profile

New Model #6193 ยป 0001-New-Model-Retevis-RT24-Aliases-Radioddity-R2.patch

Matthias Larisch, 10/25/2018 04:40 AM

View differences:

chirp/drivers/radioddity_r2.py
"""
CMD_ACK = "\x06"
CMD_ALT_ACK = "\x53"
CMD_STX = "\x02"
CMD_ENQ = "\x05"
......
raise errors.RadioError("Error communicating with radio")
# No idea yet what the next 7 bytes stand for
# as long as they start with ACK we are fine
if not ident.startswith(CMD_ACK):
# as long as they start with ACK (or ALT_ACK on some devices) we are fine
if not ident.startswith(CMD_ACK) and not ident.startswith(CMD_ALT_ACK):
_r2_exit_programming_mode(radio)
LOG.debug(util.hexprint(ident))
raise errors.RadioError("Radio returned unknown identification string")
......
_r2_exit_programming_mode(radio)
@directory.register
class RadioddityR2Radio(chirp_common.CloneModeRadio):
class RadioddityR2(chirp_common.CloneModeRadio):
"""Radioddity R2"""
VENDOR = "Radioddity"
MODEL = "R2"
......
# This radio has always been post-metadata, so never do
# old-school detection
return False
class RT24Alias(chirp_common.Alias):
VENDOR = "Retevis"
MODEL = "RT24"
@directory.register
class RadioddityR2Generic(RadioddityR2):
ALIASES = [RT24Alias]
    (1-1/1)