pause_resume: add CLEAR_PAUSE gcode
Allow the user to clear the pause state without restoring position. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
505e96b7ed
commit
35a45e2446
|
@ -16,6 +16,7 @@ class PauseResume:
|
||||||
self.printer.register_event_handler("klippy:ready", self.handle_ready)
|
self.printer.register_event_handler("klippy:ready", self.handle_ready)
|
||||||
self.gcode.register_command("PAUSE", self.cmd_PAUSE)
|
self.gcode.register_command("PAUSE", self.cmd_PAUSE)
|
||||||
self.gcode.register_command("RESUME", self.cmd_RESUME)
|
self.gcode.register_command("RESUME", self.cmd_RESUME)
|
||||||
|
self.gcode.register_command("CLEAR_PAUSE", self.cmd_CLEAR_PAUSE)
|
||||||
def handle_ready(self):
|
def handle_ready(self):
|
||||||
self.v_sd = self.printer.lookup_object('virtual_sdcard', None)
|
self.v_sd = self.printer.lookup_object('virtual_sdcard', None)
|
||||||
def get_status(self, eventtime):
|
def get_status(self, eventtime):
|
||||||
|
@ -59,6 +60,8 @@ class PauseResume:
|
||||||
self.v_sd.cmd_M24({})
|
self.v_sd.cmd_M24({})
|
||||||
else:
|
else:
|
||||||
self.gcode.respond_info("action:resumed")
|
self.gcode.respond_info("action:resumed")
|
||||||
|
def cmd_CLEAR_PAUSE(self, params):
|
||||||
|
self.is_paused = self.pause_command_sent = False
|
||||||
|
|
||||||
def load_config(config):
|
def load_config(config):
|
||||||
return PauseResume(config)
|
return PauseResume(config)
|
||||||
|
|
Loading…
Reference in New Issue