diff options
Diffstat (limited to 'klippy/extras/pause_resume.py')
-rw-r--r-- | klippy/extras/pause_resume.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/klippy/extras/pause_resume.py b/klippy/extras/pause_resume.py index 0a2226b9..229bd6f4 100644 --- a/klippy/extras/pause_resume.py +++ b/klippy/extras/pause_resume.py @@ -15,10 +15,14 @@ class PauseResume: self.pause_command_sent = False self.printer.register_event_handler("klippy:connect", self.handle_connect) - self.gcode.register_command("PAUSE", self.cmd_PAUSE) - self.gcode.register_command("RESUME", self.cmd_RESUME) - self.gcode.register_command("CLEAR_PAUSE", self.cmd_CLEAR_PAUSE) - self.gcode.register_command("CANCEL_PRINT", self.cmd_CANCEL_PRINT) + self.gcode.register_command("PAUSE", self.cmd_PAUSE, + desc=self.cmd_PAUSE_help) + self.gcode.register_command("RESUME", self.cmd_RESUME, + desc=self.cmd_RESUME_help) + self.gcode.register_command("CLEAR_PAUSE", self.cmd_CLEAR_PAUSE, + desc=self.cmd_CLEAR_PAUSE_help) + self.gcode.register_command("CANCEL_PRINT", self.cmd_CANCEL_PRINT, + desc=self.cmd_CANCEL_PRINT_help) webhooks = self.printer.lookup_object('webhooks') webhooks.register_endpoint("pause_resume/cancel", self._handle_cancel_request) @@ -51,6 +55,7 @@ class PauseResume: self.sd_paused = False self.gcode.respond_info("action:paused") self.pause_command_sent = True + cmd_PAUSE_help = ("Pauses the current print") def cmd_PAUSE(self, gcmd): if self.is_paused: gcmd.respond_info("Print already paused") @@ -66,6 +71,7 @@ class PauseResume: else: self.gcode.respond_info("action:resumed") self.pause_command_sent = False + cmd_RESUME_help = ("Resumes the print from a pause") def cmd_RESUME(self, gcmd): if not self.is_paused: gcmd.respond_info("Print is not paused, resume aborted") @@ -76,8 +82,11 @@ class PauseResume: % (velocity)) self.send_resume_command() self.is_paused = False + cmd_CLEAR_PAUSE_help = ( + "Clears the current paused state without resuming the print") def cmd_CLEAR_PAUSE(self, gcmd): self.is_paused = self.pause_command_sent = False + cmd_CANCEL_PRINT_help = ("Cancel the current print") def cmd_CANCEL_PRINT(self, gcmd): self.cmd_PAUSE(gcmd) if not self.sd_paused: |