mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 21:14:05 -06:00
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>
This commit is contained in:
parent
55be26097f
commit
b5e4f3d204
6 changed files with 38 additions and 16 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue