From 94e052af838cdebadda8566611d0d1a6f11dc74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 6 Jan 2014 11:11:59 +0100 Subject: [PATCH] Set all heaters to off upon cancel of print job --- src/octoprint/printer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/octoprint/printer.py b/src/octoprint/printer.py index c42c5b17..bf2ac184 100644 --- a/src/octoprint/printer.py +++ b/src/octoprint/printer.py @@ -290,7 +290,11 @@ class Printer(): self._comm.cancelPrint() if disableMotorsAndHeater: - self.commands(["M84", "M104 S0", "M140 S0", "M106 S0"]) # disable motors, switch off heaters and fan + # disable motors, switch off hotends, bed and fan + commands = ["M84"] + commands.extend(map(lambda x: "M104 T%d S0" % x, range(settings().getInt(["printerParameters", "numExtruders"])))) + commands.extend(["M140 S0", "M106 S0"]) + self.commands(commands) # reset progress, height, print time self._setCurrentZ(None)