Skip to content

Commit

Permalink
Update shaketune/helpers/resonance_test.py
Browse files Browse the repository at this point in the history
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
  • Loading branch information
Frix-x and sourcery-ai[bot] authored Dec 22, 2024
1 parent 38568ef commit d5fd19c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions shaketune/helpers/resonance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit d5fd19c

Please sign in to comment.