now the sensors reconnects after connection issues
This commit is contained in:
parent
2df8221eaf
commit
d9295dd05d
|
@ -37,7 +37,7 @@ def main():
|
|||
else:
|
||||
continue
|
||||
#print repr(data)
|
||||
except socket.error, msg:
|
||||
except (socket.error, serial.serialutil.SerialException), msg:
|
||||
# got disconnected?
|
||||
print "serial socket error!!!", msg
|
||||
platform.reconnect()
|
||||
|
|
|
@ -38,7 +38,7 @@ def main():
|
|||
t = platform.serial_sock.read(1)
|
||||
else:
|
||||
continue
|
||||
except socket.error as msg:
|
||||
except (socket.error, serial.serialutil.SerialException), msg:
|
||||
# got disconnected?
|
||||
print "serial socket error!!!", msg
|
||||
platform.reconnect()
|
||||
|
|
|
@ -75,7 +75,7 @@ def main():
|
|||
t = platform.serial_sock.read(1)
|
||||
else:
|
||||
continue
|
||||
except socket.error as msg:
|
||||
except (socket.error, serial.serialutil.SerialException), msg:
|
||||
# got disconnected?
|
||||
print "serial socket error!!!", msg
|
||||
platform.reconnect()
|
||||
|
|
Loading…
Reference in New Issue