main
Valentin Ochs 2022-11-22 22:09:14 +01:00
parent 14a6cf2042
commit 9358dfc74b
1 changed files with 3 additions and 0 deletions

View File

@ -149,10 +149,13 @@ class Control(util.Loggable):
"closing some more")
self._comms.cmd_close()
controlling = False
action = None
elif self.state() == state.ERROR:
# Position too high, restart
self._logger().debug("Error")
self._comm.cmd_restart()
sleep(5)
self._comm.cmd_close()
self.target(state.CLOSE)
else:
self._logger().debug("Reached wrong state")