Since the global feedrate can be similarly modified for moves ahead of
time, save the original feedrate in the planner as we do for
gcode_target.
This avoids having to undo feedmultiply (and machine limits!) from
"nominal_speed" as previously done.
Thanks @leptun
Remove incorrect usage of stop_and_save_print combined with the
fsensor_recovert internal instruction which would result in a
broken sequence of events and/or broken stack.
Re-use the now safe stop/recover functions in the same spot
(fsensor_checkpoint_stream) to effectively cut a hole in the current
gcode stream to insert an M600 instruction, which removes all
recursive behavior without the need of extra state variables.
When starting to replay existing USB/SD commands from a recovery state,
an immediate relative move needs to compensate for a previously
interrupted move. This is almost the norm for the E axis.
Instead of saving the relative status of the move (which needs to
account for the world2machine conversion and is not always available on
a chunked move split by MBL) save directly the calculated target
position for the move in the original plan, which is easy to replay.
While handling moves in a recursive plan, such a filament check,
ensure restore_print_from_ram_and_continue unwinds the stack by
aborting early from any call that waits on the planner.
This currently only handles G1 moves, but hard-coded behavior that can
trigger recursive behavior (such as filament change) will probably have
to be checked too.
Ensure card.printingHasFinished sees all the planned moves before
clearing sdprinting. To do that, we need to ensure all SD commands
exited the command queue.
- Introduce raise_z_above to move Z carefully when the current position
is potentially unknown, using stallguard
- Use raise_z_above for:
* filament loading/unloading clearance
* extruder spacing when preheating (to avoid buildplate marks on PEI)
* before homing to avoid damaging the build plate and to avoid
repeated Z moves as well
Since raise_z_above is conditional, it will only raise when needed.
Calling raise_z_above when the extruder position is unknown and already
at maximum travel is safe and will prevent further vertical moves.