Revert "toolhead: change SET_VELOCITY_LIMIT respond behavior"

This reverts commit 9f75e348b0.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-24 12:34:00 -04:00
parent 9f75e348b0
commit 75183bfb86
1 changed files with 7 additions and 19 deletions

View File

@ -553,23 +553,15 @@ class ToolHead:
cmd_SET_VELOCITY_LIMIT_help = "Set printer velocity limits"
def cmd_SET_VELOCITY_LIMIT(self, gcmd):
print_time = self.get_last_move_time()
max_velocity = gcmd.get_float('VELOCITY', None, above=0.)
max_accel = gcmd.get_float('ACCEL', None, above=0.)
max_velocity = gcmd.get_float('VELOCITY', self.max_velocity, above=0.)
max_accel = gcmd.get_float('ACCEL', self.max_accel, above=0.)
square_corner_velocity = gcmd.get_float(
'SQUARE_CORNER_VELOCITY', None, minval=0.)
requested_accel_to_decel = gcmd.get_float(
'ACCEL_TO_DECEL', None, above=0.)
'SQUARE_CORNER_VELOCITY', self.square_corner_velocity, minval=0.)
self.requested_accel_to_decel = gcmd.get_float(
'ACCEL_TO_DECEL', self.requested_accel_to_decel, above=0.)
self.max_velocity = max_velocity
self.max_accel = max_accel
self.square_corner_velocity = square_corner_velocity
if max_velocity is not None:
self.max_velocity = max_velocity
if max_accel is not None:
self.max_accel = max_accel
if square_corner_velocity is not None:
self.square_corner_velocity = square_corner_velocity
if requested_accel_to_decel is not None:
self.requested_accel_to_decel = requested_accel_to_decel
self._calc_junction_deviation()
msg = ("max_velocity: %.6f\n"
"max_accel: %.6f\n"
@ -579,10 +571,6 @@ class ToolHead:
self.requested_accel_to_decel,
self.square_corner_velocity))
self.printer.set_rollover_info("toolhead", "toolhead: %s" % (msg,))
if (max_velocity is None and
max_accel is None and
square_corner_velocity is None and
requested_accel_to_decel is None):
gcmd.respond_info(msg, log=False)
def cmd_M204(self, gcmd):
# Use S for accel