diff options
author | Stefan Dej <meteyou@gmail.com> | 2021-06-02 16:45:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 10:45:27 -0400 |
commit | b5e4f3d20453b2720fbb2e21b1585637048271f8 (patch) | |
tree | 7b992ca01ca217ec342c9e839c374ba778017098 /klippy/extras/pause_resume.py | |
parent | 55be26097f6a287a73db523f4d11556add8970e6 (diff) | |
download | kutter-b5e4f3d20453b2720fbb2e21b1585637048271f8.tar.gz kutter-b5e4f3d20453b2720fbb2e21b1585637048271f8.tar.xz kutter-b5e4f3d20453b2720fbb2e21b1585637048271f8.zip |
gcode: Update gcode descriptions (#4335)
Add help description to HELP
Add help description to RESPOND
Add help description to MEASURE_AXES_NOISE, TEST_RESONANCES and SHAPER_CALIBRATE
Add help description to PAUSE, RESUME, CLEAR_PAUSE and CANCEL_PRINT
Add help description to GET_POSITION
Add help description to SET_RETRACTION and GET_RETRACTION
Signed-off-by: Stefan Dej <meteyou@gmail.com>
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: |