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 20
20
import queue
21
21
import sys
22
22
import threading
23
+ import time
23
24
from abc import ABC , abstractmethod
24
25
from enum import IntEnum
25
26
from typing import Tuple
@@ -124,6 +125,7 @@ def WriteLine(self, line: bytes):
124
125
logger .error (
125
126
"SerialException: Failed to send serial data to device. Closing and reopening COM port before retrying once." )
126
127
self .closeSerial ()
128
+ time .sleep (1 )
127
129
self .openSerial ()
128
130
self .lcd_serial .write (line )
129
131
@@ -140,6 +142,7 @@ def ReadData(self, readSize: int):
140
142
logger .error (
141
143
"SerialException: Failed to read serial data from device. Closing and reopening COM port before retrying once." )
142
144
self .closeSerial ()
145
+ time .sleep (1 )
143
146
self .openSerial ()
144
147
return self .lcd_serial .read (readSize )
145
148
You can’t perform that action at this time.
0 commit comments