File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -532,6 +532,7 @@ void disable_all_steppers() {
532532 enqueue_and_echo_commands_P (PSTR (FILAMENT_RUNOUT_SCRIPT));
533533 #else
534534 systemservice.PauseTrigger (TRIGGER_SOURCE_RUNOUT);
535+ RunoutResponseDelayed::modify_runout_distance_mm (FILAMENT_RUNOUT_DISTANCE_MM);
535536 #endif
536537 }
537538
Original file line number Diff line number Diff line change @@ -384,6 +384,14 @@ class FilamentSensorBase {
384384 #endif
385385 }
386386
387+ static inline void modify_runout_distance_mm (float distance) {
388+ #if EXTRUDERS > 1
389+ runout_mm_countdown[actual_extruder] = runout_distance_mm = distance;
390+ #else
391+ runout_mm_countdown[active_extruder] = runout_distance_mm = distance;
392+ #endif
393+ }
394+
387395 static inline bool has_run_out () {
388396 return runout_mm_countdown[active_extruder] < 0 ;
389397 }
Original file line number Diff line number Diff line change @@ -159,13 +159,18 @@ void GcodeSuite::M600() {
159159#else
160160#include " ../../../gcode/gcode.h"
161161#include " ../snapmaker/src/module/toolhead_3dp.h"
162+ #include " ../../../feature/runout.h"
162163void GcodeSuite::M600 () {
164+ planner.synchronize ();
165+ if (systemservice.GetCurrentStatus () == SYSTAT_WORK) {
166+ RunoutResponseDelayed::modify_runout_distance_mm (0.001 );
167+ }
168+
163169 #if EXTRUDERS > 1
164170 printer1->ResetFilamentState (0 , actual_extruder);
165171 #else
166172 printer1->ResetFilamentState (0 , active_extruder);
167173 #endif
168- event_filament_runout ();
169174}
170175
171176#endif // ADVANCED_PAUSE_FEATURE
Original file line number Diff line number Diff line change 3838 /**
3939 * Marlin release version identifier
4040 */
41- #define SHORT_BUILD_VERSION "SM2-5.2.0 "
41+ #define SHORT_BUILD_VERSION "SM2-5.2.1 "
4242
4343 /**
4444 * Verbose version identifier which should contain a reference to the location
5151 * here we define this default string as the date where the latest release
5252 * version was tagged.
5353 */
54- #define STRING_DISTRIBUTION_DATE "2024-1113 "
54+ #define STRING_DISTRIBUTION_DATE "2024-1216 "
5555
5656 /**
5757 * Required minimum Configuration.h and Configuration_adv.h file versions.
Original file line number Diff line number Diff line change @@ -507,6 +507,7 @@ ErrCode SystemService::ResumeOver() {
507507 switch (ModuleBase::toolhead ()) {
508508 case MODULE_TOOLHEAD_3DP:
509509 case MODULE_TOOLHEAD_DUALEXTRUDER:
510+ RunoutResponseDelayed::modify_runout_distance_mm (FILAMENT_RUNOUT_DISTANCE_MM);
510511 if (runout.is_filament_runout ()) {
511512 LOG_E (" No filemant! Please insert filemant!\n " );
512513 PauseTrigger (TRIGGER_SOURCE_RUNOUT);
You can’t perform that action at this time.
0 commit comments