extruder: Add new SYNC_EXTRUDER_MOTION command

This command is a rename of SYNC_STEPPER_TO_EXTRUDER.  This change is
in preparation for the removal of SYNC_STEPPER_TO_EXTRUDER.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-01-29 19:45:40 -05:00
parent 9ec9742484
commit 2af8c5aa86
3 changed files with 24 additions and 6 deletions

View file

@ -31,6 +31,9 @@ class ExtruderStepper:
gcode.register_mux_command("SET_EXTRUDER_ROTATION_DISTANCE", "EXTRUDER",
self.name, self.cmd_SET_E_ROTATION_DISTANCE,
desc=self.cmd_SET_E_ROTATION_DISTANCE_help)
gcode.register_mux_command("SYNC_EXTRUDER_MOTION", "EXTRUDER",
self.name, self.cmd_SYNC_EXTRUDER_MOTION,
desc=self.cmd_SYNC_EXTRUDER_MOTION_help)
gcode.register_mux_command("SET_EXTRUDER_STEP_DISTANCE", "EXTRUDER",
self.name, self.cmd_SET_E_STEP_DISTANCE,
desc=self.cmd_SET_E_STEP_DISTANCE_help)
@ -111,6 +114,11 @@ class ExtruderStepper:
rotation_dist = -rotation_dist
gcmd.respond_info("Extruder '%s' rotation distance set to %0.6f"
% (self.name, rotation_dist))
cmd_SYNC_EXTRUDER_MOTION_help = "Set extruder stepper motion queue"
def cmd_SYNC_EXTRUDER_MOTION(self, gcmd):
ename = gcmd.get('MOTION_QUEUE')
self.sync_to_extruder(ename)
gcmd.respond_info("Extruder stepper now syncing with '%s'" % (ename,))
cmd_SET_E_STEP_DISTANCE_help = "Set extruder step distance"
def cmd_SET_E_STEP_DISTANCE(self, gcmd):
step_dist = gcmd.get_float('DISTANCE', None, above=0.)