[chirp_devel] [PATCH 6/6] Fix status reporting in UV-5R (#2343)

Zachary T Welch
Wed Mar 4 23:19:13 PST 2015


From: Zach Welch <zach at mandolincreekfarm.com>

# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
# Fake Node ID 65278104b45c86cf57ba3b92cec73cd37a475204

Fix status reporting in UV-5R (#2343)

This patch ensures the UV-5R driver reports 100% completion after
finishing an upload or download.

diff --git a/chirp/drivers/uv5r.py b/chirp/drivers/uv5r.py
index beb1392..915431f 100644
--- a/chirp/drivers/uv5r.py
+++ b/chirp/drivers/uv5r.py
@@ -519,6 +519,7 @@ def _do_download(radio):
     for i in range(0, 0x1800, 0x40):
         data += _read_block(radio, i, 0x40)
         _do_status(radio, i)
+    _do_status(radio, radio.get_memsize())
     LOG.debug("done.")
     LOG.debug("downloading aux block...")
     # Auxiliary block starts at 0x1ECO (?)
@@ -568,6 +569,7 @@ def _do_upload(radio):
     for i in range(0x08, 0x1808, 0x10):
         _send_block(radio, i - 0x08, radio.get_mmap()[i:i + 0x10])
         _do_status(radio, i)
+    _do_status(radio, radio.get_memsize())
 
     if len(radio.get_mmap().get_packed()) == 0x1808:
         LOG.info("Old image, not writing aux block")




More information about the chirp_devel mailing list