@@ -235,7 +235,7 @@ def getStateString(self):
235235 return "Closed with Error: %s" % (self .getShortErrorString ())
236236 #if self._state == self.STATE_TRANSFERING_FILE:
237237 # return "Transfering file to SD"
238- if self ._state == self . STATE_NOT_READY_TO_PRINT :
238+ if self ._state == self .STATE_NOT_READY_TO_PRINT :
239239 return "Not ready to print"
240240 return "?%d?" % (self ._state )
241241
@@ -256,6 +256,9 @@ def isClosedOrError(self):
256256 def isError (self ):
257257 return self ._state == self .STATE_ERROR or self ._state == self .STATE_CLOSED_WITH_ERROR
258258
259+ def isWaitingForBedClean (self ):
260+ return self ._state == self .STATE_NOT_READY_TO_PRINT
261+
259262 def isOperational (self ):
260263 return self ._state == self .STATE_OPERATIONAL or self ._state == self .STATE_PRINTING or self ._state == self .STATE_PAUSED #or self._state == self.STATE_TRANSFERING_FILE
261264
@@ -361,7 +364,7 @@ def sendCommand(self, cmd):
361364 cmd = cmd .encode ('ascii' , 'replace' )
362365 if self .isPrinting () or self ._pauseInProgress :
363366 self ._commandQueue .appendleft (cmd )
364- elif self .isOperational ():
367+ elif self .isOperational () or self . isWaitingForBedClean () :
365368 self ._sendCommand (cmd )
366369
367370 def startPrint (self ):
@@ -982,7 +985,7 @@ def _monitor(self):
982985 self ._callback .disconnect ()
983986
984987 ### Operational
985- elif self ._state == self .STATE_OPERATIONAL or self ._state == self .STATE_PAUSED :
988+ elif self ._state in [ self .STATE_OPERATIONAL , self .STATE_PAUSED , self .STATE_NOT_READY_TO_PRINT ] :
986989 #Request the temperature on comm timeout (every 5 seconds) when we are not printing.
987990 if line == "" or "wait" in lineLower or "ok" in lineLower :
988991 if self ._resendDelta is not None :
0 commit comments