|
@@ -44,9 +44,9 @@ class SerialConnection:
|
|
|
except serial.SerialException:
|
|
|
self._ser = None
|
|
|
else:
|
|
|
+ time.sleep(10)
|
|
|
self.open()
|
|
|
- if not self._ser:
|
|
|
- time.sleep(10)
|
|
|
+ return None
|
|
|
|
|
|
def read(self, n=64):
|
|
|
if self._ser:
|
|
@@ -56,9 +56,8 @@ class SerialConnection:
|
|
|
self._ser = None
|
|
|
return None
|
|
|
else:
|
|
|
+ time.sleep(10)
|
|
|
self.open()
|
|
|
- if not self._ser:
|
|
|
- time.sleep(10)
|
|
|
return None
|
|
|
|
|
|
def readline(self):
|
|
@@ -69,9 +68,8 @@ class SerialConnection:
|
|
|
self._ser = None
|
|
|
return None
|
|
|
else:
|
|
|
+ time.sleep(10)
|
|
|
self.open()
|
|
|
- if not self._ser:
|
|
|
- time.sleep(10)
|
|
|
return None
|
|
|
|
|
|
def isConnected(self):
|