File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1660,6 +1660,11 @@ void setup() {
1660
1660
1661
1661
marlin_state = MF_RUNNING;
1662
1662
1663
+ #if ENABLED(SPEAKER) && defined(STARTUP_TUNE)
1664
+ constexpr uint16_t tune[] = STARTUP_TUNE;
1665
+ for (uint8_t i = 0 ; i < COUNT (tune); i += 2 ) BUZZ (tune[i + 1 ], tune[i]);
1666
+ #endif
1667
+
1663
1668
SETUP_LOG (" setup() completed." );
1664
1669
1665
1670
TERN_ (MARLIN_TEST_BUILD, runStartupTests ());
Original file line number Diff line number Diff line change 30
30
#include " ../../libs/buzzer.h" // Buzzer, if possible
31
31
32
32
/* *
33
- * M300: Play beep sound S<frequency Hz> P<duration ms>
33
+ * M300: Play a Tone / Add a tone to the queue
34
+ *
35
+ * S<frequency> - (Hz) The frequency of the tone. 0 for silence.
36
+ * P<duration> - (ms) The duration of the tone.
34
37
*/
35
38
void GcodeSuite::M300 () {
36
- uint16_t const frequency = parser.ushortval (' S' , 260 );
39
+ const uint16_t frequency = parser.ushortval (' S' , 260 );
37
40
uint16_t duration = parser.ushortval (' P' , 1000 );
38
41
39
42
// Limits the tone duration to 0-5 seconds.
You can’t perform that action at this time.
0 commit comments