From 10d63ec2cccd549ca7e6edf9462b3969ec53c867 Mon Sep 17 00:00:00 2001 From: shrlnm Date: Thu, 30 Mar 2023 10:48:52 +0300 Subject: [PATCH] fix high boudrate exception --- pyren3/mod_elm.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyren3/mod_elm.py b/pyren3/mod_elm.py index b75d711..073155d 100644 --- a/pyren3/mod_elm.py +++ b/pyren3/mod_elm.py @@ -404,8 +404,12 @@ class Port: print("\r\t\t\t\t\rChecking port speed:", s, end=' ') sys.stdout.flush () - self.hdr.baudrate = s - self.hdr.flushInput () + try: + self.hdr.baudrate = s + self.hdr.flushInput () + except: + continue + self.write ("\r") # search > string