🐛 Fix conditional M81 suicide (#23549)
This commit is contained in:
committed by
Scott Lahteine
parent
6f82d1befb
commit
7b4f5108ac
@ -24,7 +24,9 @@
|
||||
* power.cpp - power control
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL)
|
||||
|
||||
#include "power.h"
|
||||
#include "../module/planner.h"
|
||||
@ -40,8 +42,6 @@
|
||||
#include "../gcode/gcode.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL)
|
||||
|
||||
Power powerManager;
|
||||
bool Power::psu_on;
|
||||
|
||||
@ -97,6 +97,10 @@ void Power::power_on() {
|
||||
* Processes any PSU_POWEROFF_GCODE and makes a PS_OFF_SOUND if enabled.
|
||||
*/
|
||||
void Power::power_off() {
|
||||
SERIAL_ECHOLNPGM(STR_POWEROFF);
|
||||
|
||||
TERN_(HAS_SUICIDE, suicide());
|
||||
|
||||
if (!psu_on) return;
|
||||
|
||||
#ifdef PSU_POWEROFF_GCODE
|
||||
|
Reference in New Issue
Block a user