Commit d2eb9d3e authored by Guillaume Seguin's avatar Guillaume Seguin

Rework off() to work with Marlin

parent d3dd5ccf
...@@ -1426,11 +1426,16 @@ class pronsole(cmd.Cmd): ...@@ -1426,11 +1426,16 @@ class pronsole(cmd.Cmd):
def off(self, ignore = None): def off(self, ignore = None):
if self.p.online: if self.p.online:
if self.p.printing: self.pause(None) if self.p.printing: self.pause(None)
self.onecmd("M84; motors off") self.log(_("; Motors off"))
self.onecmd("M104 S0; extruder off") self.onecmd("M84")
self.onecmd("M140 S0; heatbed off") self.log(_("; Extruder off"))
self.onecmd("M107; fan off") self.onecmd("M104 S0")
self.onecmd("M81; power supply off") self.log(_("; Heatbed off"))
self.onecmd("M140 S0")
self.log(_("; Fan off"))
self.onecmd("M107")
self.log(_("; Power supply off"))
self.onecmd("M81")
else: else:
self.logError(_("Printer is not online. Unable to turn it off.")) self.logError(_("Printer is not online. Unable to turn it off."))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment