From f6744142025992ec9aaaa8524fcd74e7b6070ba4 Mon Sep 17 00:00:00 2001 From: Jim Unroe Date: Mon, 17 Jul 2023 20:02:55 -0400 Subject: [PATCH] ga510.py: add 'reset' after clone error and upload The radio has to be power cycled after upload or clone errors. This patch fixes issue by adding missing 'resets' to close communicatons. --- chirp/drivers/ga510.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py index b18794713..1294c5620 100644 --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -56,6 +56,7 @@ def start_program(radio): if not ack.endswith(b'\x06'): LOG.debug('Ack was %r' % ack) raise errors.RadioError('Radio did not respond to clone request') + reset(radio) radio.pipe.write(b'F') @@ -85,9 +86,11 @@ def do_download(radio): if raddr != addr: raise errors.RadioError('Radio send address %04x, expected %04x' % (raddr, addr)) + reset(radio) if rlen != 0x40 or len(block) != 0x40: raise errors.RadioError('Radio sent %02x (%02x) bytes, ' 'expected %02x' % (rlen, len(block), 0x40)) + reset(radio) data += block @@ -119,10 +122,13 @@ def do_upload(radio): ack = radio.pipe.read(1) if ack != b'\x06': raise errors.RadioError('Radio refused block at addr %04x' % addr) + reset(radio) s.cur = addr radio.status_fn(s) + reset(radio) + BASE_FORMAT = """ struct {