mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 08:08:25 +00:00
🚸 UI Sound off/on with M300 E<0|1> (#26142)
This commit is contained in:
parent
88f5e2c639
commit
867f5e9069
1 changed files with 11 additions and 0 deletions
|
@ -34,8 +34,19 @@
|
|||
*
|
||||
* S<frequency> - (Hz) The frequency of the tone. 0 for silence.
|
||||
* P<duration> - (ms) The duration of the tone.
|
||||
*
|
||||
* With SOUND_MENU_ITEM:
|
||||
* E<0|1> - Mute or enable sound
|
||||
*/
|
||||
void GcodeSuite::M300() {
|
||||
|
||||
#if ENABLED(SOUND_MENU_ITEM)
|
||||
if (parser.seen('E')) {
|
||||
ui.sound_on = parser.value_bool();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
const uint16_t frequency = parser.ushortval('S', 260);
|
||||
uint16_t duration = parser.ushortval('P', 1000);
|
||||
|
||||
|
|
Loading…
Reference in a new issue