Skip to content

[2.0.x] Automatically reset stepper timeout#10179

Merged
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_auto_reset_stepper_timeout
Mar 22, 2018
Merged

[2.0.x] Automatically reset stepper timeout#10179
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_auto_reset_stepper_timeout

Conversation

@thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Mar 21, 2018

Responding to #9980

Currently if you add a single move to the planner that takes longer than the max_inactive_time (as set by M85) the steppers will power off immediately after the move completes.

This PR adds code to manage_inactivity to reset the timer whenever the planner has a block.

As a result of this change, any code that adds moves to the planner can skip resetting the stepper timeout. We can let idle / manage_inactivity reset the timer whenever it detects any moves in the planner.

Continue to call reset_stepper_timeout from any code that wants to prevent the steppers from sleeping, such as, for example, when waiting for a user response between manual probes.

Also:

  • Rename refresh_cmd_timeout to reset_stepper_timeout and previous_cmd_ms to previous_move_ms to make it clear these pertain to the stepper timeout.
  • Rename blocks_queued to has_blocks_queued to clarify that it's a flag.

Counterpart to #10178

Any code that adds moves to the planner can skip resetting the stepper timeout. We can let `idle` / `manage_inactivity` reset the timer whenever it detects any moves in the planner.
@thinkyhead thinkyhead force-pushed the bf2_auto_reset_stepper_timeout branch from 3f5c03b to 0f65872 Compare March 22, 2018 00:20
@thinkyhead thinkyhead merged commit 1cb810f into MarlinFirmware:bugfix-2.0.x Mar 22, 2018
@thinkyhead thinkyhead deleted the bf2_auto_reset_stepper_timeout branch March 22, 2018 00:30
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.

1 participant