VerifyFilamentEnteredPTFE must take into account the Extra Loading Distance

This commit is contained in:
Guðni Már Gilbert 2022-11-19 17:07:48 +00:00 committed by DRracer
parent c9d9ba0b1a
commit 327f0edb17
1 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ bool MMU2::VerifyFilamentEnteredPTFE()
uint8_t fsensorState = 0;
// MMU has finished its load, push the filament further by some defined constant length
// If the filament sensor reads 0 at any moment, then report FAILURE
current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH;
current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - logic.ExtraLoadDistance();
plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE);
while(blocks_queued())
@ -334,7 +334,7 @@ bool MMU2::VerifyFilamentEnteredPTFE()
} else {
// else, happy printing! :)
// Revert the movements
current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH);
current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - logic.ExtraLoadDistance());
plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE);
st_synchronize();
return true;