♻️ Small sound / buzz refactor (#24520)

This commit is contained in:
Scott Lahteine
2022-07-18 19:53:36 -05:00
parent 97a73147fa
commit f752fe75ee
16 changed files with 49 additions and 55 deletions

View File

@@ -28,7 +28,7 @@
//#define MUTE_GAMES
#if ENABLED(MUTE_GAMES) || !HAS_BUZZER
#if ENABLED(MUTE_GAMES) || !HAS_SOUND
#define _BUZZ(D,F) NOOP
#else
#define _BUZZ(D,F) BUZZ(D,F)

View File

@@ -31,7 +31,7 @@
#include "../../module/temperature.h"
#include "../../gcode/queue.h"
#if HAS_BUZZER
#if HAS_SOUND
#include "../../libs/buzzer.h"
#endif
@@ -272,7 +272,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
encoderTopLine = encoderLine;
}
#if HAS_BUZZER
#if HAS_SOUND
void MarlinUI::completion_feedback(const bool good/*=true*/) {
TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click...
if (good) OKAY_BUZZ(); else ERR_BUZZ();