From 2fc8b50f11087e942b35fa0308bba5feff045716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Thu, 28 Jul 2022 08:47:58 +0000 Subject: [PATCH] Fix lcd_show_multiscreen_message_yes_no_and_wait_P after rebase --- Firmware/ultralcd.cpp | 16 +++++----------- Firmware/ultralcd.h | 7 ++++--- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index dd88c7a3d..460806add 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3243,15 +3243,15 @@ void lcd_show_choices_prompt_P(uint8_t selected, const char *first_choice, const //! @param second_choice text caption of second possible choice. Must be in PROGMEM //! @param third_choice text caption of second possible choice. Must be in PROGMEM. When not set to nullptr first_choice and second_choice may not be more than 5 characters long. //! @param second_col column on LCD where second_choice starts -//! @param multiscreen_cb an optional call back that will be called periodically when the printer is paused for user //! @retval 0 first choice selected by user //! @retval 1 first choice selected by user //! @retval 2 third choice selected by user //! @retval -1 screen timed out (only possible if allow_timeouting is true) -int8_t lcd_show_multiscreen_message_with_choices_and_wait_P(const char * const msg, bool allow_timeouting, uint8_t default_selection, - const char * const first_choice, const char * const second_choice, const char * const third_choice, uint8_t second_col, - void (*multiscreen_cb)(void)) -{ +int8_t lcd_show_multiscreen_message_with_choices_and_wait_P( + const char *const msg, bool allow_timeouting, uint8_t default_selection, + const char *const first_choice, const char *const second_choice, const char *const third_choice, + uint8_t second_col +) { const char *msg_next = msg ? lcd_display_message_fullscreen_P(msg) : NULL; bool multi_screen = msg_next != NULL; lcd_set_custom_characters_nextpage(); @@ -3275,12 +3275,6 @@ int8_t lcd_show_multiscreen_message_with_choices_and_wait_P(const char * const m manage_heater(); manage_inactivity(true); - if (multiscreen_cb) { - multiscreen_cb(); - } - - - if (abs(enc_dif - lcd_encoder_diff) >= ENCODER_PULSES_PER_STEP) { if (msg_next == NULL) { if (third_choice) { // third_choice is not nullptr, safe to dereference diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 767c2c952..2037e990e 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -81,9 +81,10 @@ extern void lcd_show_fullscreen_message_and_wait_P(const char *msg); extern int8_t lcd_show_yes_no_and_wait(bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE); // 1: no, 0: yes, -1: timeouted extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE); -extern int8_t lcd_show_multiscreen_message_with_choices_and_wait_P(const char * const msg, bool allow_timeouting, uint8_t default_selection, - const char * const first_choice, const char * const second_choice, const char * const third_choice = nullptr, uint8_t second_col = 7, - void (*multiscreen_cb)(void) = nullptr); +extern int8_t lcd_show_multiscreen_message_with_choices_and_wait_P( + const char * const msg, bool allow_timeouting, uint8_t default_selection, + const char * const first_choice, const char * const second_choice, const char * const third_choice = nullptr, + uint8_t second_col = 7); extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE); // Ask the user to move the Z axis up to the end stoppers and let // the user confirm that it has been done.