From c36e39909e421045df498be3d952010fa7f219df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 9 Jun 2013 17:44:06 +0200 Subject: [PATCH] Always reset heatingUp flag when receiving an ok --- octoprint/util/comm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/octoprint/util/comm.py b/octoprint/util/comm.py index 3b025e9..fa5e804 100644 --- a/octoprint/util/comm.py +++ b/octoprint/util/comm.py @@ -613,8 +613,6 @@ class MachineCom(object): t = time.time() self._heatupWaitTimeLost = t - self._heatupWaitStartTime self._heatupWaitStartTime = t - else: - heatingUp = False ##~~ SD Card handling elif 'SD init fail' in line: @@ -662,6 +660,9 @@ class MachineCom(object): elif line.strip() != '' and line.strip() != 'ok' and not line.startswith("wait") and not line.startswith('Resend:') and line != 'echo:Unknown command:""\n' and self.isOperational(): self._callback.mcMessage(line) + if "ok" in line and heatingUp: + heatingUp = False + ### Baudrate detection if self._state == self.STATE_DETECT_BAUDRATE: if line == '' or time.time() > timeout: