now the sensors reconnects after connection issues

This commit is contained in:
Stefan Kögl 2014-03-27 14:04:44 +01:00
parent 2df8221eaf
commit d9295dd05d
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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()