File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 2020import queue
2121import sys
2222import threading
23+ import time
2324from abc import ABC , abstractmethod
2425from enum import IntEnum
2526from typing import Tuple
@@ -124,6 +125,7 @@ def WriteLine(self, line: bytes):
124125 logger .error (
125126 "SerialException: Failed to send serial data to device. Closing and reopening COM port before retrying once." )
126127 self .closeSerial ()
128+ time .sleep (1 )
127129 self .openSerial ()
128130 self .lcd_serial .write (line )
129131
@@ -140,6 +142,7 @@ def ReadData(self, readSize: int):
140142 logger .error (
141143 "SerialException: Failed to read serial data from device. Closing and reopening COM port before retrying once." )
142144 self .closeSerial ()
145+ time .sleep (1 )
143146 self .openSerial ()
144147 return self .lcd_serial .read (readSize )
145148
You can’t perform that action at this time.
0 commit comments