diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-04-25 14:58:44 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-04-30 11:26:19 -0400 |
commit | b1ea4f3befe202e681115fe4e6b4a5986a581e17 (patch) | |
tree | ad5e4c02d6d0e0af60c6c882dd92637dbaa30fc0 | |
parent | 5a5ecd88e22a25ef9ec5336f3d3220af042678be (diff) | |
download | kutter-b1ea4f3befe202e681115fe4e6b4a5986a581e17.tar.gz kutter-b1ea4f3befe202e681115fe4e6b4a5986a581e17.tar.xz kutter-b1ea4f3befe202e681115fe4e6b4a5986a581e17.zip |
toolhead: Do not limit SET_VELOCITY_LIMIT to values specified in config
Allow a larger velocity, accel, and square_corner_velocity than what
is specified in the config file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | docs/Config_Changes.md | 4 | ||||
-rw-r--r-- | klippy/toolhead.py | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index bf8f1124..64fd43c5 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -6,6 +6,10 @@ All dates in this document are approximate. # Changes +20210430: The SET_VELOCITY_LIMIT (and M204) command may now set a +velocity, acceleration, and square_corner_velocity larger than the +specified values in the config file. + 20210325: Support for the `pin_map` config option is deprecated. Use the [sample-aliases.cfg](../config/sample-aliases.cfg) file to translate to the actual micro-controller pin names. The `pin_map` diff --git a/klippy/toolhead.py b/klippy/toolhead.py index e1a79179..abb4eb5f 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -217,9 +217,6 @@ class ToolHead: self.max_accel_to_decel = self.requested_accel_to_decel self.square_corner_velocity = config.getfloat( 'square_corner_velocity', 5., minval=0.) - self.config_max_velocity = self.max_velocity - self.config_max_accel = self.max_accel - self.config_square_corner_velocity = self.square_corner_velocity self.junction_deviation = 0. self._calc_junction_deviation() # Print time tracking @@ -560,10 +557,9 @@ class ToolHead: '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 = min(max_velocity, self.config_max_velocity) - self.max_accel = min(max_accel, self.config_max_accel) - self.square_corner_velocity = min(square_corner_velocity, - self.config_square_corner_velocity) + self.max_velocity = max_velocity + self.max_accel = max_accel + self.square_corner_velocity = square_corner_velocity self._calc_junction_deviation() msg = ("max_velocity: %.6f\n" "max_accel: %.6f\n" @@ -586,7 +582,7 @@ class ToolHead: % (gcmd.get_commandline(),)) return accel = min(p, t) - self.max_accel = min(accel, self.config_max_accel) + self.max_accel = accel self._calc_junction_deviation() def add_printer_objects(config): |