Project

General

Profile

Bug #7699 » anytone.patch

Craig Jones, 03/12/2020 08:00 PM

View differences:

chirp/drivers/anytone.py Thu Oct 24 15:46:01 2019 +0200 → chirp/drivers/anytone.py Thu Mar 12 19:42:47 2020 -0700
30 30

  
31 31
LOG = logging.getLogger(__name__)
32 32

  
33
STEPS = [2.5, 5.0, 10.0, 12.5, 20.0, 25.0, 30.0, 50.0, 100.0]
34

  
33 35
_mem_format = """
34 36
#seekto 0x0100;
35 37
struct {
......
205 207
    response = radio.pipe.read(3)
206 208
    if response != "QX\x06":
207 209
        LOG.debug("Response was:\n%s" % util.hexprint(response))
208
        raise errors.RadioError("Unsupported model")
210
        raise errors.RadioError("Unsupported model or bad connection")
209 211
    _echo_write(radio, "\x02")
210 212
    response = radio.pipe.read(16)
211 213
    LOG.debug(util.hexprint(response))
......
354 356
        rf.has_bank = False
355 357
        rf.has_cross = True
356 358
        rf.has_tuning_step = False
359
        rf.valid_tuning_steps = STEPS
357 360
        rf.has_rx_dtcs = True
358 361
        rf.valid_skips = ["", "S", "P"]
359 362
        rf.valid_modes = ["FM", "NFM", "AM"]
    (1-1/1)