Pārlūkot izejas kodu

🎨 Power-off tone followup (#22222)

Cytown 4 gadus atpakaļ
vecāks
revīzija
f399706911
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 9
- 0
Marlin/src/feature/power.cpp Parādīt failu

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

+ 0
- 4
Marlin/src/gcode/control/M80_M81.cpp Parādīt failu

101
     #endif
101
     #endif
102
   #endif
102
   #endif
103
 
103
 
104
-  #if ENABLED(PS_OFF_SOUND)
105
-    BUZZ(1000, 659);
106
-  #endif
107
-
108
   safe_delay(1000); // Wait 1 second before switching off
104
   safe_delay(1000); // Wait 1 second before switching off
109
 
105
 
110
   #if HAS_SUICIDE
106
   #if HAS_SUICIDE

Notiek ielāde…
Atcelt
Saglabāt