Browse Source

🩹 Status / Host Prompt followup (#25720)

Followup to #25679

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp 1 year ago
parent
commit
5d8d38a911
3 changed files with 12 additions and 12 deletions
  1. 7 0
      Marlin/src/lcd/marlinui.cpp
  2. 5 5
      Marlin/src/lcd/marlinui.h
  3. 0 7
      Marlin/src/lcd/menu/menu.cpp

+ 7 - 0
Marlin/src/lcd/marlinui.cpp

@@ -1424,6 +1424,13 @@ void MarlinUI::init() {
 
   #endif // HAS_ENCODER_ACTION
 
+  #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();
+    }
+  #endif
+
 #endif // HAS_WIRED_LCD
 
 #if HAS_STATUS_MESSAGE

+ 5 - 5
Marlin/src/lcd/marlinui.h

@@ -494,11 +494,6 @@ public:
 
       static void status_screen();
 
-    #else
-
-      static void quick_feedback(const bool=true) {}
-      static void completion_feedback(const bool=true) {}
-
     #endif
 
     #if HAS_MARLINUI_U8GLIB
@@ -529,6 +524,11 @@ public:
 
   #endif
 
+  #if !HAS_WIRED_LCD
+    static void quick_feedback(const bool=true) {}
+    static void completion_feedback(const bool=true) {}
+  #endif
+
   #if ENABLED(SDSUPPORT)
     #if BOTH(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU)
       #define MARLINUI_SCROLL_NAME 1

+ 0 - 7
Marlin/src/lcd/menu/menu.cpp

@@ -271,13 +271,6 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
     encoderTopLine = encoderLine;
 }
 
-#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();
-  }
-#endif
-
 #if HAS_LINE_TO_Z
 
   void line_to_z(const_float_t z) {