Skip to content
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

Remove [SAVE|RESTORE]_GCODE_STATE from PRINT_END macro #452

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

voidtrance
Copy link
Contributor

The sample configuration for some boards contain PRINT_END macros that include [SAVE|RESTORE]_GCODE_STATE command in them.

Unfortunately, those commands may have a negative effect in that the macro tries to perform some safety moves between them to move the toolhead away from the print. However, when the GCode state is restore, Klipper will move the toolhead to the last position before the GCode state is save. This will negate the safety moves and put the toolhead back where it was.

Fix this by removing the [SAVE|RESTORE]_GCODE_STATE command.

@KiloQubit
Copy link
Contributor

RESTORE_GCODE_STATE does NOT move the toolhead back to its original position unless MOVE=1 is specified, which it is not.

https://www.klipper3d.org/G-Codes.html#restore_gcode_state

@voidtrance
Copy link
Contributor Author

RESTORE_GCODE_STATE does NOT move the toolhead back to its original position unless MOVE=1 is specified, which it is not.

https://www.klipper3d.org/G-Codes.html#restore_gcode_state

You are correct. I'll change the commit text.

@voidtrance
Copy link
Contributor Author

I've updated the change to match the one already merged into the Trident repository.

Copy link
Contributor

@KiloQubit KiloQubit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the save_gcode_state back up to before the M400/G92? That would also match the Trident configs.

…ronDesign#136)

The PRINT_END macro in the Octopus config file contains a pair of
SAVE_GCODE_STATE/RESTORE_GCODE_STATE command. The purpose of those
commands is to allow the macro to perfom actions at the end of the
print and then restore the printer state as it was prior to the
macro's execution (restore coordinate system and speeds).

However, there was some confusion as to the effect of those calls,
particularly the RESTORE_GCODE_STATE. What is desired is that the
printer state is restored but the toolhead position is not.

To clarify the intention and prevent any issues, the "MOVE=0"
argument to RESTORE_GCODE_STATE is added as to explicitly prevent
any toolhead position changes and a comment is added to describe
the purpose of the commands.

Since having the commands in the PRINT_END macro is something that
is needed, the same commands have also been added to any of the
other configs which were missing it.
@KiloQubit KiloQubit merged commit de7e89d into VoronDesign:Voron2.4 Nov 22, 2023
1 check passed
@voidtrance voidtrance deleted the for/Voron-2/print-end branch November 22, 2023 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants