[chirp_devel] [PATCH 1 of 4] [yaesu_clone] Add messages to help users remember clone procedure
Marco Filippi IZ3GME
Tue Oct 8 07:16:22 PDT 2013
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1381240997 -7200
# Node ID df2b549f5cc6cb5cb74b734f12da6b65cef1e5db
# Parent 917830c94a36e21a0b30cad52a62f5df3430ea94
[yaesu_clone] Add messages to help users remember clone procedure
part of feature #1163
diff --git a/chirp/yaesu_clone.py b/chirp/yaesu_clone.py
--- a/chirp/yaesu_clone.py
+++ b/chirp/yaesu_clone.py
@@ -59,6 +59,9 @@
data = ""
blocks = 0
+ status = chirp_common.Status()
+ status.msg = radio._START_CLONE_TX_MSG
+ radio.status_fn(status)
for block in radio._block_lengths:
blocks += 1
if blocks == len(radio._block_lengths):
@@ -124,7 +127,11 @@
if buf and buf[0] != chr(CMD_ACK):
buf = pipe.read(block)
if not buf or buf[-1] != chr(CMD_ACK):
- raise Exception("Radio did not ack block %i" % blocks)
+ if blocks == 0:
+ raise Exception(_("Radio did not ack first block\n")
+ + radio._START_CLONE_RX_MSG)
+ else :
+ raise Exception(_("Radio did not ack block %i") % blocks)
else:
_chunk_write(pipe, radio.get_mmap()[pos:],
radio.status_fn, radio._block_size)
@@ -178,6 +185,12 @@
VENDOR = "Yaesu"
_model = "ABCDE"
+ _START_CLONE_TX_MSG = _("Waiting for radio to start clone process\n"
+ "Please put radio in Clone-TX now")
+ _START_CLONE_RX_MSG = _("This is often because, "
+ "before to press the OK button, "
+ "you forget to put radio in Clone-RX")
+
def _checksums(self):
"""Return a list of checksum objects that need to be calculated"""
return []
More information about the chirp_devel
mailing list