-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TEST_SPEED.cfg #120
Conversation
Klipper no longer has a MAX_ACCEL_TO_DECEL paramter in the firmware, it has been changed to MINIMUM CRUISE RATIO. This is a patch that works for now.
Tested config, I don't know what the klipper internal parameter for minimum cruise ratio name is. Need to figure that out, this is working at he moment.
I was coming here to report the same |
There is an open issue as well: #119 This patch changes a lot of other stuff and there's commented out code. From briefly looking at this I'm not sure what the best solution is, I'm guessing there are no mechanisms to handle backward compatibility in klipper. Maybe setting and resetting both In my case it errored with:
Probably because References: https://www.klipper3d.org/Config_Reference.html#printer https://www.klipper3d.org/Config_Changes.html?h=max_accel_to_decel#changes |
macros/TEST_SPEED.cfg
Outdated
@@ -63,49 +63,51 @@ gcode: | |||
G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60} | |||
|
|||
# Set new limits | |||
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2} | |||
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} #MIN_CRUISE_RATIO = {0.5} #ACCEL_TO_DECEL={accel / 2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} #MIN_CRUISE_RATIO = {0.5} #ACCEL_TO_DECEL={accel / 2} | |
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} MINIMUM_CRUISE_RATIO=0 |
We want to disable the minimum cruise ratio, right? To ensure we actually move at the speed and accel that this macro wants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right here. MIN_CRUISE_RATIO=0.5 is the default behavior which can lead to incorrect results in the test scenarios that use smaller shapes for testing. Therefore, MIN_CRUISE_RATIO=0 is the right piece of code to have here.
macros/TEST_SPEED.cfg
Outdated
{% endfor %} | ||
|
||
# Restore max speed/accel/accel_to_decel to their configured values | ||
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} | ||
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} #MIN_CRUISE_RATIO={printer.configfile.settings.printer.minimum_cruise_ratio} #ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} #MIN_CRUISE_RATIO={printer.configfile.settings.printer.minimum_cruise_ratio} #ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} | |
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} MINIMUM_CRUISE_RATIO={printer.configfile.settings.printer.minimum_cruise_ratio} |
And set it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is correct as I have just set these parameters on my machine and they work fine.
Fixes proposed by jomik. This is working with settings being restored after testing.
The issues mentioned by the open issue fix have been fixed in this final commit thank to Jomik's suggestions. Thank you all for your help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Klipper no longer has a MAX_ACCEL_TO_DECEL paramter in the firmware, it has been changed to MINIMUM CRUISE RATIO.
This is a patch that works for now.