From d5fd19c42cac105cbf17c5cdb5a0fb07fb1d6841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Sun, 22 Dec 2024 22:04:11 +0100 Subject: [PATCH] Update shaketune/helpers/resonance_test.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- shaketune/helpers/resonance_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/shaketune/helpers/resonance_test.py b/shaketune/helpers/resonance_test.py index 47a93b9..09f8558 100644 --- a/shaketune/helpers/resonance_test.py +++ b/shaketune/helpers/resonance_test.py @@ -218,11 +218,7 @@ def _run_test_sequence(self, axis_direction, test_seq): old_max_accel = toolhead_info['max_accel'] # Set velocity limits - if test_seq: - max_accel = max(abs(a) for _, a, _ in test_seq) - else: - max_accel = old_max_accel # no moves, just default - + max_accel = max(abs(a) for _, a, _ in test_seq) if test_seq else old_max_accel if 'minimum_cruise_ratio' in toolhead_info: # minimum_cruise_ratio found: Klipper >= v0.12.0-239 old_mcr = toolhead_info['minimum_cruise_ratio'] gcode.run_script_from_command(f'SET_VELOCITY_LIMIT ACCEL={max_accel} MINIMUM_CRUISE_RATIO=0')