Improve Power-loss Recovery (#15135)

This commit is contained in:
Scott Lahteine
2019-09-10 18:52:41 -05:00
committed by GitHub
parent 75927e17dd
commit c590e8ac05
9 changed files with 87 additions and 32 deletions

View File

@ -96,6 +96,10 @@
#include "../feature/backlash.h"
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../feature/power_loss_recovery.h"
#endif
// Delay for delivery of first block to the stepper ISR, if the queue contains 2 or
// fewer movements. The delay is measured in milliseconds, and must be less than 250ms
#define BLOCK_DELAY_FOR_1ST_MOVE 100
@ -2507,6 +2511,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
mixer.gradient_control(target_float[Z_AXIS]);
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
block->sdpos = recovery.command_sdpos();
#endif
// Movement was accepted
return true;
} // _populate_block()