From 9f963696c8d91b9b71840612228d1ced5f531608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 20 Feb 2017 12:44:24 +0100 Subject: [PATCH] Interpret wait during connect fully as ok Otherwise we might switch to connected state but lack an acknowledgement to send the next lines and stay in a wait cycle. Also related to #1770 --- src/octoprint/util/comm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index d872886e..3653a108 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1384,6 +1384,9 @@ class MachineCom(object): startSeen = True self.sayHello() elif line.startswith("ok") or (supportWait and line == "wait"): + if line == "wait": + # if it was a wait we probably missed an ok, so let's simulate that now + self._handle_ok() self._onConnected() elif time.time() > self._timeout: self._log("There was a timeout while trying to connect to the printer")