chiark / gitweb /
Improve user feedback when canceling a print
authornickthetait <tait@alephobjects.com>
Wed, 6 Jan 2016 13:54:47 +0000 (06:54 -0700)
committernickthetait <tait@alephobjects.com>
Mon, 11 Jan 2016 15:10:48 +0000 (08:10 -0700)
Display cancelation message on printers that have an LCD

Cura/util/printerConnection/serialConnection.py

index 40a87e70f35552bf1b473eb9c24502972cbbef93..8999c80b69ce4b36f310ed6d6f4c4571e3aee161 100644 (file)
@@ -111,6 +111,11 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
 
        def disableSteppers(self):
                self.sendCommand("M18")
+               
+       def setLCDmessage(self):
+               cancel_text = "Print canceled"
+               formatted_command = "M117 {}".format(cancel_text)
+               self.sendCommand(formatted_command)
 
        #Abort the previously loaded print file
        def cancelPrint(self):
@@ -123,6 +128,7 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
                self._pausePosition = None
                self.coolDown()
                self.disableSteppers()
+               self.setLCDmessage()
 
        def isPrinting(self):
                return self._commState == machineCom.MachineCom.STATE_PRINTING