Commit d973abf4 authored by Guillaume Seguin's avatar Guillaume Seguin

Add "off" button

parent 64bd0694
...@@ -380,6 +380,8 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False): ...@@ -380,6 +380,8 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False):
root.printbtn.Disable() root.printbtn.Disable()
root.pausebtn = make_sized_button(parentpanel, _("Pause"), root.pause, _("Pause Current Print"), self) root.pausebtn = make_sized_button(parentpanel, _("Pause"), root.pause, _("Pause Current Print"), self)
root.recoverbtn = make_sized_button(parentpanel, _("Recover"), root.recover, _("Recover previous Print"), self) root.recoverbtn = make_sized_button(parentpanel, _("Recover"), root.recover, _("Recover previous Print"), self)
root.offbtn = make_sized_button(parentpanel, _("Off"), root.off, _("Turn printer off"), self)
root.printerControls.append(root.offbtn)
return self return self
class MainWindow(wx.Frame): class MainWindow(wx.Frame):
......
...@@ -1421,6 +1421,9 @@ class pronsole(cmd.Cmd): ...@@ -1421,6 +1421,9 @@ class pronsole(cmd.Cmd):
self.log(_("home xyze - homes all axes and zeroes the extruder (Using G28 and G92)")) self.log(_("home xyze - homes all axes and zeroes the extruder (Using G28 and G92)"))
def do_off(self, l): def do_off(self, l):
self.off()
def off(self):
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.onecmd("M84; motors 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