From a414bfb864b0a97fe3bdb3ab243358fc289509f9 Mon Sep 17 00:00:00 2001 From: Andrew 'ncrmnt' Andrianov Date: Sat, 14 Oct 2017 21:08:26 +0300 Subject: [PATCH] protocols.py: Increase clock_safety_factor to 2.5 This fixes cp2102 and ch341a baudswitch on mac sierra Signed-off-by: Andrew 'ncrmnt' Andrianov --- stcgal/protocols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stcgal/protocols.py b/stcgal/protocols.py index 07eebad..f22c660 100644 --- a/stcgal/protocols.py +++ b/stcgal/protocols.py @@ -249,7 +249,7 @@ class StcBaseProtocol: bit_time = 1.0 / self.ser.baudrate byte_time = bit_time * 11.0 # start, 8 data bits, stop, parity - clock_safety_factor = 1.05 # additional delay in case clock is slow + clock_safety_factor = 2.5 # additional delay in case clock is slow time.sleep(byte_time * length * clock_safety_factor) def set_option(self, name, value):