chiark / gitweb /
Disable motors when a print is canceled. Follow on to #118
authornickthetait <tait@alephobjects.com>
Fri, 26 Jun 2015 18:15:51 +0000 (12:15 -0600)
committernickthetait <tait@alephobjects.com>
Fri, 26 Jun 2015 20:19:00 +0000 (14:19 -0600)
Cura/util/printerConnection/serialConnection.py

index a25a9ed796ebf2bd08c61bfda5751daf780e0f1b..db447ce9c219eefed5aa3307eb5d751f651c4925 100644 (file)
@@ -102,7 +102,9 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
                        self.sendCommand(change_toolhead)
                        self.sendCommand(cooldown_toolhead)
                self.sendCommand("M140 S0") #Bed
-               pass
+
+       def disableSteppers(self):
+               self.sendCommand("M18")
 
        #Abort the previously loaded print file
        def cancelPrint(self):
@@ -111,6 +113,7 @@ class serialConnection(printerConnectionBase.printerConnectionBase):
                self._process.stdin.write('STOP\n')
                self._printProgress = 0
                self.coolDown()
+               self.disableSteppers()
 
        def isPrinting(self):
                return self._commState == machineCom.MachineCom.STATE_PRINTING or self.isPaused()