✨ SD Endstop Abort G-Code (#24461)
This commit is contained in:
parent
b02c3258b5
commit
7f2a836251
@ -1589,6 +1589,9 @@
|
|||||||
* Endstops must be activated for this option to work.
|
* Endstops must be activated for this option to work.
|
||||||
*/
|
*/
|
||||||
//#define SD_ABORT_ON_ENDSTOP_HIT
|
//#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
|
//#define SD_REPRINT_LAST_SELECTED_FILE // On print completion open the LCD Menu and select the same file
|
||||||
|
|
||||||
|
@ -551,6 +551,10 @@ void Endstops::event_handler() {
|
|||||||
card.abortFilePrintNow();
|
card.abortFilePrintNow();
|
||||||
quickstop_stepper();
|
quickstop_stepper();
|
||||||
thermalManager.disable_all_heaters();
|
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();
|
print_job_timer.stop();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user