Browse Source

Add empty ui.completion_feedback

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
69f211cf78
  1. 4
      Marlin/src/lcd/menu/menu.cpp
  2. 2
      Marlin/src/lcd/menu/menu_advanced.cpp
  3. 10
      Marlin/src/lcd/menu/menu_bed_leveling.cpp
  4. 2
      Marlin/src/lcd/menu/menu_cancelobject.cpp
  5. 5
      Marlin/src/lcd/menu/menu_configuration.cpp
  6. 2
      Marlin/src/lcd/menu/menu_main.cpp
  7. 2
      Marlin/src/lcd/ultralcd.h

4
Marlin/src/lcd/menu/menu.cpp

@ -413,12 +413,12 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
#if ENABLED(EEPROM_SETTINGS)
void lcd_store_settings() {
const bool saved = settings.save();
TERN_(HAS_BUZZER, ui.completion_feedback(saved));
ui.completion_feedback(saved);
UNUSED(saved);
}
void lcd_load_settings() {
const bool loaded = settings.load();
TERN_(HAS_BUZZER, ui.completion_feedback(loaded));
ui.completion_feedback(loaded);
UNUSED(loaded);
}
#endif

2
Marlin/src/lcd/menu/menu_advanced.cpp

@ -587,7 +587,7 @@ void menu_advanced_settings() {
MSG_BUTTON_INIT, MSG_BUTTON_CANCEL,
[]{
const bool inited = settings.init_eeprom();
TERN_(HAS_BUZZER, ui.completion_feedback(inited));
ui.completion_feedback(inited);
UNUSED(inited);
},
ui.goto_previous_screen,

10
Marlin/src/lcd/menu/menu_bed_leveling.cpp

@ -48,13 +48,7 @@
static uint8_t manual_probe_index;
// LCD probed points are from defaults
constexpr uint8_t total_probe_points = (
#if ENABLED(AUTO_BED_LEVELING_3POINT)
3
#elif ABL_GRID || ENABLED(MESH_BED_LEVELING)
GRID_MAX_POINTS
#endif
);
constexpr uint8_t total_probe_points = TERN(AUTO_BED_LEVELING_3POINT, 3, GRID_MAX_POINTS);
//
// Bed leveling is done. Wait for G29 to complete.
@ -75,7 +69,7 @@
ui.synchronize(GET_TEXT(MSG_LEVEL_BED_DONE));
#endif
ui.goto_previous_screen_no_defer();
TERN_(HAS_BUZZER, ui.completion_feedback());
ui.completion_feedback();
}
if (ui.should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT(MSG_LEVEL_BED_DONE));
ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);

2
Marlin/src/lcd/menu/menu_cancelobject.cpp

@ -44,7 +44,7 @@ static void lcd_cancel_object_confirm() {
MenuItem_confirm::confirm_screen(
[]{
cancelable.cancel_object(MenuItemBase::itemIndex - 1);
TERN_(HAS_BUZZER, ui.completion_feedback());
ui.completion_feedback();
ui.goto_previous_screen();
},
ui.goto_previous_screen,

5
Marlin/src/lcd/menu/menu_configuration.cpp

@ -450,10 +450,7 @@ void menu_configuration() {
#endif
if (!busy)
ACTION_ITEM(MSG_RESTORE_DEFAULTS, []{
settings.reset();
TERN_(HAS_BUZZER, ui.completion_feedback());
});
ACTION_ITEM(MSG_RESTORE_DEFAULTS, []{ settings.reset(); ui.completion_feedback(); });
END_MENU();
}

2
Marlin/src/lcd/menu/menu_main.cpp

@ -239,7 +239,7 @@ void menu_main() {
#if HAS_SERVICE_INTERVALS
static auto _service_reset = [](const int index) {
print_job_timer.resetServiceInterval(index);
TERN_(HAS_BUZZER, ui.completion_feedback());
ui.completion_feedback();
ui.reset_status();
ui.return_to_status();
};

2
Marlin/src/lcd/ultralcd.h

@ -397,6 +397,8 @@ public:
static void quick_feedback(const bool clear_buttons=true);
#if HAS_BUZZER
static void completion_feedback(const bool good=true);
#else
static inline void completion_feedback(const bool=true) {}
#endif
#if DISABLED(LIGHTWEIGHT_UI)

Loading…
Cancel
Save