Parcourir la source

Add empty ui.completion_feedback

Scott Lahteine il y a 5 ans
Parent
révision
69f211cf78

+ 2
- 2
Marlin/src/lcd/menu/menu.cpp Voir le fichier

413
 #if ENABLED(EEPROM_SETTINGS)
413
 #if ENABLED(EEPROM_SETTINGS)
414
   void lcd_store_settings() {
414
   void lcd_store_settings() {
415
     const bool saved = settings.save();
415
     const bool saved = settings.save();
416
-    TERN_(HAS_BUZZER, ui.completion_feedback(saved));
416
+    ui.completion_feedback(saved);
417
     UNUSED(saved);
417
     UNUSED(saved);
418
   }
418
   }
419
   void lcd_load_settings() {
419
   void lcd_load_settings() {
420
     const bool loaded = settings.load();
420
     const bool loaded = settings.load();
421
-    TERN_(HAS_BUZZER, ui.completion_feedback(loaded));
421
+    ui.completion_feedback(loaded);
422
     UNUSED(loaded);
422
     UNUSED(loaded);
423
   }
423
   }
424
 #endif
424
 #endif

+ 1
- 1
Marlin/src/lcd/menu/menu_advanced.cpp Voir le fichier

587
       MSG_BUTTON_INIT, MSG_BUTTON_CANCEL,
587
       MSG_BUTTON_INIT, MSG_BUTTON_CANCEL,
588
       []{
588
       []{
589
         const bool inited = settings.init_eeprom();
589
         const bool inited = settings.init_eeprom();
590
-        TERN_(HAS_BUZZER, ui.completion_feedback(inited));
590
+        ui.completion_feedback(inited);
591
         UNUSED(inited);
591
         UNUSED(inited);
592
       },
592
       },
593
       ui.goto_previous_screen,
593
       ui.goto_previous_screen,

+ 2
- 8
Marlin/src/lcd/menu/menu_bed_leveling.cpp Voir le fichier

48
   static uint8_t manual_probe_index;
48
   static uint8_t manual_probe_index;
49
 
49
 
50
   // LCD probed points are from defaults
50
   // LCD probed points are from defaults
51
-  constexpr uint8_t total_probe_points = (
52
-    #if ENABLED(AUTO_BED_LEVELING_3POINT)
53
-      3
54
-    #elif ABL_GRID || ENABLED(MESH_BED_LEVELING)
55
-      GRID_MAX_POINTS
56
-    #endif
57
-  );
51
+  constexpr uint8_t total_probe_points = TERN(AUTO_BED_LEVELING_3POINT, 3, GRID_MAX_POINTS);
58
 
52
 
59
   //
53
   //
60
   // Bed leveling is done. Wait for G29 to complete.
54
   // Bed leveling is done. Wait for G29 to complete.
75
         ui.synchronize(GET_TEXT(MSG_LEVEL_BED_DONE));
69
         ui.synchronize(GET_TEXT(MSG_LEVEL_BED_DONE));
76
       #endif
70
       #endif
77
       ui.goto_previous_screen_no_defer();
71
       ui.goto_previous_screen_no_defer();
78
-      TERN_(HAS_BUZZER, ui.completion_feedback());
72
+      ui.completion_feedback();
79
     }
73
     }
80
     if (ui.should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT(MSG_LEVEL_BED_DONE));
74
     if (ui.should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT(MSG_LEVEL_BED_DONE));
81
     ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);
75
     ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);

+ 1
- 1
Marlin/src/lcd/menu/menu_cancelobject.cpp Voir le fichier

44
   MenuItem_confirm::confirm_screen(
44
   MenuItem_confirm::confirm_screen(
45
     []{
45
     []{
46
       cancelable.cancel_object(MenuItemBase::itemIndex - 1);
46
       cancelable.cancel_object(MenuItemBase::itemIndex - 1);
47
-      TERN_(HAS_BUZZER, ui.completion_feedback());
47
+      ui.completion_feedback();
48
       ui.goto_previous_screen();
48
       ui.goto_previous_screen();
49
     },
49
     },
50
     ui.goto_previous_screen,
50
     ui.goto_previous_screen,

+ 1
- 4
Marlin/src/lcd/menu/menu_configuration.cpp Voir le fichier

450
   #endif
450
   #endif
451
 
451
 
452
   if (!busy)
452
   if (!busy)
453
-    ACTION_ITEM(MSG_RESTORE_DEFAULTS, []{
454
-      settings.reset();
455
-      TERN_(HAS_BUZZER, ui.completion_feedback());
456
-    });
453
+    ACTION_ITEM(MSG_RESTORE_DEFAULTS, []{ settings.reset(); ui.completion_feedback(); });
457
 
454
 
458
   END_MENU();
455
   END_MENU();
459
 }
456
 }

+ 1
- 1
Marlin/src/lcd/menu/menu_main.cpp Voir le fichier

239
   #if HAS_SERVICE_INTERVALS
239
   #if HAS_SERVICE_INTERVALS
240
     static auto _service_reset = [](const int index) {
240
     static auto _service_reset = [](const int index) {
241
       print_job_timer.resetServiceInterval(index);
241
       print_job_timer.resetServiceInterval(index);
242
-      TERN_(HAS_BUZZER, ui.completion_feedback());
242
+      ui.completion_feedback();
243
       ui.reset_status();
243
       ui.reset_status();
244
       ui.return_to_status();
244
       ui.return_to_status();
245
     };
245
     };

+ 2
- 0
Marlin/src/lcd/ultralcd.h Voir le fichier

397
       static void quick_feedback(const bool clear_buttons=true);
397
       static void quick_feedback(const bool clear_buttons=true);
398
       #if HAS_BUZZER
398
       #if HAS_BUZZER
399
         static void completion_feedback(const bool good=true);
399
         static void completion_feedback(const bool good=true);
400
+      #else
401
+        static inline void completion_feedback(const bool=true) {}
400
       #endif
402
       #endif
401
 
403
 
402
       #if DISABLED(LIGHTWEIGHT_UI)
404
       #if DISABLED(LIGHTWEIGHT_UI)

Chargement…
Annuler
Enregistrer