From 49b0c043288a66928bfac6365beb026554e06c8f Mon Sep 17 00:00:00 2001 From: nickthetait Date: Fri, 26 Jun 2015 12:15:51 -0600 Subject: [PATCH] Disable motors when a print is canceled. Follow on to #118 --- Cura/util/printerConnection/serialConnection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cura/util/printerConnection/serialConnection.py b/Cura/util/printerConnection/serialConnection.py index a25a9ed7..db447ce9 100644 --- a/Cura/util/printerConnection/serialConnection.py +++ b/Cura/util/printerConnection/serialConnection.py @@ -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() -- 2.30.2