From d873148f2fbf919314ae3a62035748d10360f570 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sun, 26 Mar 2023 19:20:39 -0400 Subject: [PATCH] Fix erroneous power off message when function is called with no action --- Marlin/src/feature/power.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 8a16628bac..b6ed9e7637 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -98,11 +98,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));