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

set_current_position_from_planner() after stepper.quick_stop() #3939

Merged

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented May 31, 2016

Background: The stepper.quick_stop() method (used by M410 and the "Stop print" menu item) throws away all buffered planner moves. This causes the planner / stepper positions to become out-of-sync with the current_position.

Solution: After stepper.quick_stop() call a new function set_current_position_from_planner() which:

  • waits for steppers to finish,
  • sets the current_position based on the stepper positions, and
  • updates the planner.position from the new current_position.

References: #3899, #3545 (comment)

@thinkyhead thinkyhead force-pushed the rc_resume_get_position branch 2 times, most recently from f4453d9 to b236986 Compare June 1, 2016 01:08
@thinkyhead thinkyhead added this to the 1.1.0 milestone Jun 1, 2016
@thinkyhead thinkyhead force-pushed the rc_resume_get_position branch from 31e34d1 to 664b299 Compare June 3, 2016 00:16
@thinkyhead thinkyhead merged commit 0d793fb into MarlinFirmware:RCBugFix Jun 3, 2016
@thinkyhead thinkyhead deleted the rc_resume_get_position branch June 3, 2016 00:25
@thinkyhead thinkyhead mentioned this pull request Jul 8, 2016
@kradant
Copy link

kradant commented Feb 6, 2018

I am using Marlin 1.1.5 and if use the stop function from the lcd menu (while doing a print from ssd), the print stops immediately but the printer loses its position, to be more precise he thinks he is at a position he already left. For Example if I put this in the sd file:
G1 X100
G1 X0
and stop the print shortly after the nozzle reached X100, he will think he is at X100.
I thought this issue should be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants