🚸 Fix repeating "Power Off" message (#26755)

This commit is contained in:
InsanityAutomation 2024-01-31 20:24:08 -05:00 committed by GitHub
parent d62f45bdc1
commit 5a87bea762
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,12 +102,12 @@ 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;
SERIAL_ECHOLNPGM(STR_POWEROFF);
#ifdef PSU_POWEROFF_GCODE
gcode.process_subcommands_now(F(PSU_POWEROFF_GCODE));
#endif