🎨 Power-off tone followup (#22222)

This commit is contained in:
Cytown 2021-06-26 03:50:09 +08:00 committed by Scott Lahteine
parent 42eb2347d4
commit 165ae139d5

View File

@ -33,6 +33,10 @@
#include "../module/stepper/indirection.h" #include "../module/stepper/indirection.h"
#include "../MarlinCore.h" #include "../MarlinCore.h"
#if ENABLED(PS_OFF_SOUND)
#include "../libs/buzzer.h"
#endif
#if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE) #if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE)
#include "../gcode/gcode.h" #include "../gcode/gcode.h"
#endif #endif
@ -148,6 +152,11 @@ void Power::power_off() {
#ifdef PSU_POWEROFF_GCODE #ifdef PSU_POWEROFF_GCODE
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE)); GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
#endif #endif
#if ENABLED(PS_OFF_SOUND)
BUZZ(1000, 659);
#endif
PSU_PIN_OFF(); PSU_PIN_OFF();
} }
} }