diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index a001459e9d99..dd7445fab3b1 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -389,18 +389,26 @@ class FilamentSensorBase { } static void filament_present(const uint8_t extruder) { - mm_countdown.runout[extruder] = runout_distance_mm; + if (mm_countdown.runout[extruder]steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state - // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover. + if (b->steps.e) { // execute calculation if there is any extruder movement + // there is no need to ignore retract/unretract movement as they compensate each other const uint8_t e = b->extruder; const int32_t steps = b->steps.e; const float mm = (b->direction_bits.e ? steps : -steps) * planner.mm_per_step[E_AXIS_N(e)];