Always reset heatingUp flag when receiving an ok

master
Gina Häußge 2013-06-09 17:44:06 +02:00
parent 5b15d42881
commit c36e39909e
1 changed files with 3 additions and 2 deletions

View File

@ -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: