Skip to content

Commit

Permalink
🎨 Power-off tone followup (#22222)
Browse files Browse the repository at this point in the history
  • Loading branch information
cytown authored Jun 25, 2021
1 parent 500b787 commit f399706
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Marlin/src/feature/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#include "../module/stepper/indirection.h"
#include "../MarlinCore.h"

#if ENABLED(PS_OFF_SOUND)
#include "../libs/buzzer.h"
#endif

#if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE)
#include "../gcode/gcode.h"
#endif
Expand Down Expand Up @@ -133,6 +137,11 @@ void Power::power_off() {
#ifdef PSU_POWEROFF_GCODE
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
#endif

#if ENABLED(PS_OFF_SOUND)
BUZZ(1000, 659);
#endif

PSU_PIN_OFF();
}
}
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/gcode/control/M80_M81.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ void GcodeSuite::M81() {
#endif
#endif

#if ENABLED(PS_OFF_SOUND)
BUZZ(1000, 659);
#endif

safe_delay(1000); // Wait 1 second before switching off

#if HAS_SUICIDE
Expand Down

0 comments on commit f399706

Please sign in to comment.