From a807b1b1ef93853f66caadfd6e999b026da1af47 Mon Sep 17 00:00:00 2001 From: Charles Martin Date: Thu, 22 Aug 2024 21:52:32 +1000 Subject: [PATCH] try to encode some serial port recovery --- impsy/impsio.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/impsy/impsio.py b/impsy/impsio.py index 3ac291e..8430b48 100644 --- a/impsy/impsio.py +++ b/impsy/impsio.py @@ -70,7 +70,10 @@ def send(self, output_values) -> None: # click.secho(f"Serial out: {output_message}") if self.serial is not None: self.serial.write(output_message.encode()) - + else: + # try to reconnect -- may as well, alternative is just never working. + self.connect() + def handle(self) -> None: """read in the serial bytes and process lines into value lists for IMPSY"""