Browse Source

SD Endstop Abort G-Code (#24461)

FB4S_WIFI
ExtNeon 2 years ago
committed by Scott Lahteine
parent
commit
7f2a836251
  1. 3
      Marlin/Configuration_adv.h
  2. 4
      Marlin/src/module/endstops.cpp

3
Marlin/Configuration_adv.h

@ -1589,6 +1589,9 @@
* Endstops must be activated for this option to work.
*/
//#define SD_ABORT_ON_ENDSTOP_HIT
#if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
//#define SD_ABORT_ON_ENDSTOP_HIT_GCODE "G28XY" // G-code to run on endstop hit (e.g., "G28XY" or "G27")
#endif
//#define SD_REPRINT_LAST_SELECTED_FILE // On print completion open the LCD Menu and select the same file

4
Marlin/src/module/endstops.cpp

@ -551,6 +551,10 @@ void Endstops::event_handler() {
card.abortFilePrintNow();
quickstop_stepper();
thermalManager.disable_all_heaters();
#ifdef SD_ABORT_ON_ENDSTOP_HIT_GCODE
queue.clear();
queue.inject(F(SD_ABORT_ON_ENDSTOP_HIT_GCODE));
#endif
print_job_timer.stop();
}
#endif

Loading…
Cancel
Save