[chirp_devel] [PATCH] [ft8x7] Detect when non-us driver are used to clone us radio
Marco Filippi IZ3GME
Tue Jul 9 09:51:14 PDT 2013
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1373365266 -7200
# Node ID aa63d49eff10cc6c4ddb6ab785da16c3b4041958
# Parent 3f9a95820f7dd2bdf7cc53f79b7661e93bacfcc1
[ft8x7] Detect when non-us driver are used to clone us radio
Implement feature #957
diff -r 3f9a95820f7d -r aa63d49eff10 chirp/ft817.py
--- a/chirp/ft817.py Fri Jul 05 19:03:33 2013 -0700
+++ b/chirp/ft817.py Tue Jul 09 12:21:06 2013 +0200
@@ -318,6 +318,16 @@
blocks += 1
status.cur = blocks
self.status_fn(status)
+
+ status.msg = "Clone completed, checking for spurious bytes"
+ self.status_fn(status)
+ moredata = self.pipe.read(2)
+ if moredata:
+ raise Exception("Radio sent data after the last awaited block, "
+ "this happens when the selected model is a non-US "
+ "but the radio is a US one. "
+ "Please choose the correct model and try again.")
+
print "Clone completed in %i seconds" % (time.time() - start)
More information about the chirp_devel
mailing list