-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: add _CLIENT_LINEAR_MOVE macro #39
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Pedro Lamas <[email protected]>
@pedrolamas thx for the hint and your suggestion sound future proof and has no negative impact right now. I commit it. |
{% if 'X' in params or 'Y' in params or 'Z' in params %} | ||
G9{ 0 if ABSOLUTE else 1 } | ||
{% endif %} | ||
{% if 'E' in params %} | ||
M8{ 2 if ABSOLUTE_E else 3 } | ||
{% endif %} |
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.
This is just checking if the parameter exists or not, not if it is empty (we can do _CLIENT_LINEAR_MOVE X=
and Klipper will be just fine with that, so this is not correct)
So we need to check for param exists AND ensure that the value is NOT empty.
I took it a step further and just checked for the movement parts we are sending.
{% if 'X' in params or 'Y' in params or 'Z' in params %} | |
G9{ 0 if ABSOLUTE else 1 } | |
{% endif %} | |
{% if 'E' in params %} | |
M8{ 2 if ABSOLUTE_E else 3 } | |
{% endif %} | |
{% if x_move or y_move or z_move %} | |
G9{ 0 if ABSOLUTE else 1 } | |
{% endif %} | |
{% if e_move %} | |
M8{ 2 if ABSOLUTE_E else 3 } | |
{% endif %} |
This PR will add the macro _CLIENT_LINEAR_MOVE. This will make the console less noisy for UI movements.
This PR fixes #38