# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1389908793 -3600 # Node ID fe6805f6f632016c4cf63fc3f6a75560533e5ae8 # Parent d3be34229ec9102037aad4b211d06425adc83349 [ft8x7] Do detect "non-us driver used to clone us radio" only in non us driver Refine feature #957
diff -r d3be34229ec9 -r fe6805f6f632 chirp/ft817.py --- a/chirp/ft817.py Sat Jan 11 10:13:38 2014 -0600 +++ b/chirp/ft817.py Thu Jan 16 22:46:33 2014 +0100 @@ -32,6 +32,7 @@ BAUD_RATE = 9600 MODEL = "FT-817" _model = "" + _US_model = False
DUPLEX = ["", "-", "+", "split"] # narrow modes has to be at end @@ -339,14 +340,15 @@ 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.")) + if not self._US_model: + 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) @@ -1080,6 +1082,7 @@ MODEL = "FT-817ND (US)"
_model = "" + _US_model = True _memsize = 6651 # block 9 (130 Bytes long) is to be repeted 40 times _block_lengths = [ 2, 40, 208, 182, 208, 182, 198, 53, 130, 118, 130, 130] diff -r d3be34229ec9 -r fe6805f6f632 chirp/ft857.py --- a/chirp/ft857.py Sat Jan 11 10:13:38 2014 -0600 +++ b/chirp/ft857.py Thu Jan 16 22:46:33 2014 +0100 @@ -1028,6 +1028,7 @@ MODEL = "FT-857/897 (US)"
_model = "" + _US_model = True _memsize = 7481 # block 9 (140 Bytes long) is to be repeted 40 times # should be 42 times but this way I can use original 817 functions