Ver código fonte

🎨 Power-off tone followup (#22222)

Cytown 4 anos atrás
pai
commit
f399706911
Nenhuma conta vinculada ao e-mail do autor do commit

+ 9
- 0
Marlin/src/feature/power.cpp Ver arquivo

@@ -33,6 +33,10 @@
33 33
 #include "../module/stepper/indirection.h"
34 34
 #include "../MarlinCore.h"
35 35
 
36
+#if ENABLED(PS_OFF_SOUND)
37
+  #include "../libs/buzzer.h"
38
+#endif
39
+
36 40
 #if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE)
37 41
   #include "../gcode/gcode.h"
38 42
 #endif
@@ -133,6 +137,11 @@ void Power::power_off() {
133 137
     #ifdef PSU_POWEROFF_GCODE
134 138
       GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
135 139
     #endif
140
+
141
+    #if ENABLED(PS_OFF_SOUND)
142
+      BUZZ(1000, 659);
143
+    #endif
144
+
136 145
     PSU_PIN_OFF();
137 146
   }
138 147
 }

+ 0
- 4
Marlin/src/gcode/control/M80_M81.cpp Ver arquivo

@@ -101,10 +101,6 @@ void GcodeSuite::M81() {
101 101
     #endif
102 102
   #endif
103 103
 
104
-  #if ENABLED(PS_OFF_SOUND)
105
-    BUZZ(1000, 659);
106
-  #endif
107
-
108 104
   safe_delay(1000); // Wait 1 second before switching off
109 105
 
110 106
   #if HAS_SUICIDE

Carregando…
Cancelar
Salvar