mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-06-30 02:40:57 +00:00
[2.0.x] Automatically reset stepper timeout (#10179)
* Automatically reset stepper timeout in manage_inactivity 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. * blocks_queued => has_blocks_queued
This commit is contained in:
parent
97e8a6ebd9
commit
1cb810ff1c
16 changed files with 47 additions and 62 deletions
Marlin/src/module
|
@ -1091,7 +1091,7 @@ void Stepper::init() {
|
|||
/**
|
||||
* Block until all buffered steps are executed / cleaned
|
||||
*/
|
||||
void Stepper::synchronize() { while (planner.blocks_queued() || cleaning_buffer_counter) idle(); }
|
||||
void Stepper::synchronize() { while (planner.has_blocks_queued() || cleaning_buffer_counter) idle(); }
|
||||
|
||||
/**
|
||||
* Set the stepper positions directly in steps
|
||||
|
@ -1191,7 +1191,7 @@ void Stepper::finish_and_disable() {
|
|||
void Stepper::quick_stop() {
|
||||
cleaning_buffer_counter = 5000;
|
||||
DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
while (planner.blocks_queued()) planner.discard_current_block();
|
||||
while (planner.has_blocks_queued()) planner.discard_current_block();
|
||||
current_block = NULL;
|
||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue