🚸 UI Sound off/on with M300 E<0|1> (#26142)
This commit is contained in:
committed by
GitHub
parent
88f5e2c639
commit
867f5e9069
@@ -34,8 +34,19 @@
|
|||||||
*
|
*
|
||||||
* S<frequency> - (Hz) The frequency of the tone. 0 for silence.
|
* S<frequency> - (Hz) The frequency of the tone. 0 for silence.
|
||||||
* P<duration> - (ms) The duration of the tone.
|
* P<duration> - (ms) The duration of the tone.
|
||||||
|
*
|
||||||
|
* With SOUND_MENU_ITEM:
|
||||||
|
* E<0|1> - Mute or enable sound
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M300() {
|
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);
|
const uint16_t frequency = parser.ushortval('S', 260);
|
||||||
uint16_t duration = parser.ushortval('P', 1000);
|
uint16_t duration = parser.ushortval('P', 1000);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user