File tree 3 files changed +12
-17
lines changed
3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -741,21 +741,12 @@ void idle(
741
741
#endif
742
742
}
743
743
744
- // Kill heaters, job timer, and queue
745
- void kill_activity () {
746
- thermalManager.disable_all_heaters ();
747
- stepper.quick_stop ();
748
- // queue.stop();
749
- // print_job_timer.stop();
750
- // queue.clear();
751
- }
752
-
753
744
/* *
754
745
* Kill all activity and lock the machine.
755
746
* After this the machine will need to be reset.
756
747
*/
757
- void kill (PGM_P const lcd_msg/* =nullptr*/ ) {
758
- kill_activity ();
748
+ void kill (PGM_P const lcd_msg/* =nullptr*/ , const bool steppers_off /* =false */ ) {
749
+ thermalManager. disable_all_heaters ();
759
750
760
751
SERIAL_ERROR_MSG (MSG_ERR_KILLED);
761
752
@@ -769,10 +760,10 @@ void kill(PGM_P const lcd_msg/*=nullptr*/) {
769
760
host_action_kill ();
770
761
#endif
771
762
772
- minkill ();
763
+ minkill (steppers_off );
773
764
}
774
765
775
- void minkill () {
766
+ void minkill (const bool steppers_off /* =false */ ) {
776
767
777
768
// Wait a short time (allows messages to get out before shutting down.
778
769
for (int i = 1000 ; i--;) DELAY_US (600 );
@@ -782,7 +773,11 @@ void minkill() {
782
773
// Wait to ensure all interrupts stopped
783
774
for (int i = 1000 ; i--;) DELAY_US (250 );
784
775
785
- kill_activity ();
776
+ // Reiterate heaters off
777
+ thermalManager.disable_all_heaters ();
778
+
779
+ // Power off all steppers (for M112) or just the E steppers
780
+ steppers_off ? disable_all_steppers () : disable_e_steppers ();
786
781
787
782
#if HAS_POWER_SWITCH
788
783
PSU_OFF ();
Original file line number Diff line number Diff line change @@ -322,8 +322,8 @@ void disable_e_stepper(const uint8_t e);
322
322
void disable_e_steppers ();
323
323
void disable_all_steppers ();
324
324
325
- void kill (PGM_P const lcd_msg = nullptr );
326
- void minkill ();
325
+ void kill (PGM_P const lcd_msg = nullptr , const bool steppers_off = false );
326
+ void minkill (const bool steppers_off = false );
327
327
328
328
void quickstop_stepper ();
329
329
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void GcodeSuite::M108() {
41
41
* M112: Full Shutdown
42
42
*/
43
43
void GcodeSuite::M112 () {
44
- kill (PSTR (" M112 Shutdown" ));
44
+ kill (PSTR (" M112 Shutdown" ), true );
45
45
}
46
46
47
47
/* *
You can’t perform that action at this time.
0 commit comments