🚸 Fix, Improve Power-Loss Recovery (#22828)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
MOHAMMAD RASIM
2022-02-09 21:29:34 +03:00
committed by Scott Lahteine
parent 11071c7472
commit 3e18cf2b6a
8 changed files with 51 additions and 28 deletions

View File

@ -2809,9 +2809,13 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
position = target; // Update the position
#if ENABLED(POWER_LOSS_RECOVERY)
block->sdpos = recovery.command_sdpos();
block->start_position = position_float.asLogical();
#endif
TERN_(HAS_POSITION_FLOAT, position_float = target_float);
TERN_(GRADIENT_MIX, mixer.gradient_control(target_float.z));
TERN_(POWER_LOSS_RECOVERY, block->sdpos = recovery.command_sdpos());
return true; // Movement was accepted