From 366cf1c6408578ff07eff35779bafd34e5797cd6 Mon Sep 17 00:00:00 2001 From: Jim Unroe Date: Tue, 27 Jun 2023 13:26:38 -0400 Subject: [PATCH] uv-5r.py: add 'direction' to cloning status --- chirp/drivers/uv5r.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chirp/drivers/uv5r.py b/chirp/drivers/uv5r.py index 8c27dc7ed..25341a819 100644 --- a/chirp/drivers/uv5r.py +++ b/chirp/drivers/uv5r.py @@ -331,9 +331,9 @@ GMRS_FREQS = GMRS_FREQS1 + GMRS_FREQS2 + GMRS_FREQS3 * 2 -def _do_status(radio, block): +def _do_status(radio, direction, block): status = chirp_common.Status() - status.msg = "Cloning" + status.msg = "Cloning %s radio" % direction status.cur = block status.max = radio.get_memsize() radio.status_fn(status) @@ -556,8 +556,8 @@ def _do_download(radio): LOG.debug("downloading main block...") for i in range(0, 0x1800, 0x40): data += _read_block(radio, i, 0x40, False) - _do_status(radio, i) - _do_status(radio, radio.get_memsize()) + _do_status(radio, "from", i) + _do_status(radio, "from", radio.get_memsize()) LOG.debug("done.") if radio._aux_block: LOG.debug("downloading aux block...") @@ -640,8 +640,8 @@ def _do_upload(radio): for start_addr, end_addr in ranges_main: for i in range(start_addr, end_addr, 0x10): _send_block(radio, i - 0x08, mmap[i:i + 0x10]) - _do_status(radio, i) - _do_status(radio, radio.get_memsize()) + _do_status(radio, "to", i) + _do_status(radio, "to", radio.get_memsize()) if len(mmap.get_packed()) == 0x1808: LOG.info("Old image, not writing aux block")