|
@@ -2300,7 +2300,7 @@ void show_preheat_nozzle_warning()
|
|
|
void lcd_load_filament_color_check()
|
|
|
{
|
|
|
bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true);
|
|
|
- while (!clean) {
|
|
|
+ while (clean == MIDDLE_BUTTON_CHOICE) {
|
|
|
lcd_update_enable(true);
|
|
|
lcd_update(2);
|
|
|
load_filament_final_feed();
|
|
@@ -3188,8 +3188,8 @@ lcd_wait_for_click_delay(0);
|
|
|
//! @param msg Message to show. If NULL, do not clear the screen and handle choice selection only.
|
|
|
//! @param allow_timeouting if true, allows time outing of the screen
|
|
|
//! @param default_yes if true, yes choice is selected by default, otherwise no choice is preselected
|
|
|
-//! @retval 1 yes choice selected by user
|
|
|
-//! @retval 0 no choice selected by user
|
|
|
+//! @retval 0 yes choice selected by user
|
|
|
+//! @retval 1 no choice selected by user
|
|
|
//! @retval -1 screen timed out
|
|
|
int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, bool default_yes) //currently just max. n*4 + 3 lines supported (set in language header files)
|
|
|
{
|
|
@@ -3315,8 +3315,8 @@ int8_t lcd_show_multiscreen_message_with_choices_and_wait_P(const char *msg, boo
|
|
|
//! @brief Display and wait for a Yes/No choice using the last line of the LCD
|
|
|
//! @param allow_timeouting if true, allows time outing of the screen
|
|
|
//! @param default_yes if true, yes choice is selected by default, otherwise no choice is preselected
|
|
|
-//! @retval 1 yes choice selected by user
|
|
|
-//! @retval 0 no choice selected by user
|
|
|
+//! @retval 0 yes choice selected by user
|
|
|
+//! @retval 1 no choice selected by user
|
|
|
//! @retval -1 screen timed out
|
|
|
int8_t lcd_show_yes_no_and_wait(bool allow_timeouting, bool default_yes)
|
|
|
{
|
|
@@ -3327,8 +3327,8 @@ int8_t lcd_show_yes_no_and_wait(bool allow_timeouting, bool default_yes)
|
|
|
//! @param msg Message to show. If NULL, do not clear the screen and handle choice selection only.
|
|
|
//! @param allow_timeouting if true, allows time outing of the screen
|
|
|
//! @param default_yes if true, yes choice is selected by default, otherwise no choice is preselected
|
|
|
-//! @retval 1 yes choice selected by user
|
|
|
-//! @retval 0 no choice selected by user
|
|
|
+//! @retval 0 yes choice selected by user
|
|
|
+//! @retval 1 no choice selected by user
|
|
|
//! @retval -1 screen timed out
|
|
|
//! @relates lcd_show_yes_no_and_wait
|
|
|
int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, bool default_yes)
|
|
@@ -3658,7 +3658,7 @@ void menu_setlang(unsigned char lang)
|
|
|
{
|
|
|
if (!lang_select(lang))
|
|
|
{
|
|
|
- if (lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Copy selected language?"), false, true))////MSG_COPY_SEL_LANG c=20 r=3
|
|
|
+ if (lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Copy selected language?"), false, true) == LEFT_BUTTON_CHOICE)////MSG_COPY_SEL_LANG c=20 r=3
|
|
|
lang_boot_update_start(lang);
|
|
|
lcd_update_enable(true);
|
|
|
lcd_clear();
|
|
@@ -3851,7 +3851,7 @@ void lcd_v2_calibration()
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- loaded = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, true);
|
|
|
+ loaded = !lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, true);
|
|
|
lcd_update_enabled = true;
|
|
|
|
|
|
}
|
|
@@ -3881,7 +3881,7 @@ void lcd_v2_calibration()
|
|
|
void lcd_wizard() {
|
|
|
bool result = true;
|
|
|
if (calibration_status() != CALIBRATION_STATUS_ASSEMBLED) {
|
|
|
- result = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Running Wizard will delete current calibration results and start from the beginning. Continue?"), false, false);////MSG_WIZARD_RERUN c=20 r=7
|
|
|
+ result = !lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Running Wizard will delete current calibration results and start from the beginning. Continue?"), false, false);////MSG_WIZARD_RERUN c=20 r=7
|
|
|
}
|
|
|
if (result) {
|
|
|
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
|
@@ -4044,10 +4044,10 @@ void lcd_wizard(WizState state)
|
|
|
state = S::Restore;
|
|
|
} else {
|
|
|
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_WIZARD_WELCOME), false, true);
|
|
|
- if (wizard_event) {
|
|
|
+ if (wizard_event == LEFT_BUTTON_CHOICE) {
|
|
|
state = S::Restore;
|
|
|
eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1);
|
|
|
- } else {
|
|
|
+ } else { // MIDDLE_BUTTON_CHOICE
|
|
|
eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
|
|
|
end = true;
|
|
|
}
|
|
@@ -4083,7 +4083,9 @@ void lcd_wizard(WizState state)
|
|
|
lcd_show_fullscreen_message_and_wait_P(_i("Now remove the test print from steel sheet."));////MSG_REMOVE_TEST_PRINT c=20 r=4
|
|
|
lcd_show_fullscreen_message_and_wait_P(_i("I will run z calibration now."));////MSG_WIZARD_Z_CAL c=20 r=8
|
|
|
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_STEEL_SHEET_CHECK), false, false);
|
|
|
- if (!wizard_event) lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
|
|
|
+ if (wizard_event == MIDDLE_BUTTON_CHOICE) {
|
|
|
+ lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
|
|
|
+ }
|
|
|
wizard_event = gcode_M45(true, 0);
|
|
|
if (wizard_event) {
|
|
|
//current filament needs to be unloaded and then new filament should be loaded
|
|
@@ -4104,16 +4106,10 @@ void lcd_wizard(WizState state)
|
|
|
//start to preheat nozzle and bed to save some time later
|
|
|
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0);
|
|
|
setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
|
|
- if (MMU2::mmu2.Enabled())
|
|
|
- {
|
|
|
- wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), true);
|
|
|
- } else
|
|
|
- {
|
|
|
- wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), true);
|
|
|
- }
|
|
|
- if (wizard_event) state = S::Lay1CalCold;
|
|
|
- else
|
|
|
- {
|
|
|
+ wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), true);
|
|
|
+ if (wizard_event == LEFT_BUTTON_CHOICE) {
|
|
|
+ state = S::Lay1CalCold;
|
|
|
+ } else { // MIDDLE_BUTTON_CHOICE
|
|
|
if(MMU2::mmu2.Enabled()) state = S::LoadFilCold;
|
|
|
else state = S::Preheat;
|
|
|
}
|
|
@@ -4144,7 +4140,7 @@ void lcd_wizard(WizState state)
|
|
|
break;
|
|
|
case S::RepeatLay1Cal:
|
|
|
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Do you want to repeat last step to readjust distance between nozzle and heatbed?"), false);////MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
|
|
|
- if (wizard_event)
|
|
|
+ if (wizard_event == LEFT_BUTTON_CHOICE)
|
|
|
{
|
|
|
lcd_show_fullscreen_message_and_wait_P(_i("Please clean heatbed and then press the knob."));////MSG_WIZARD_CLEAN_HEATBED c=20 r=8
|
|
|
state = S::Lay1CalCold;
|
|
@@ -5099,7 +5095,7 @@ char reset_menu() {
|
|
|
static void lcd_disable_farm_mode()
|
|
|
{
|
|
|
int8_t disable = lcd_show_fullscreen_message_yes_no_and_wait_P(PSTR("Disable farm mode?"), true, false); //allow timeouting, default no
|
|
|
- if (disable)
|
|
|
+ if (disable == LEFT_BUTTON_CHOICE)
|
|
|
{
|
|
|
enquecommand_P(PSTR("G99"));
|
|
|
lcd_return_to_status();
|
|
@@ -7461,8 +7457,7 @@ static void menu_action_sdfile(const char* filename)
|
|
|
//filename is just a pointer to card.filename, which changes everytime you try to open a file by filename. So you can't use filename directly
|
|
|
//to open a file. Instead, the cached filename in cmd is used as that one is static for the whole lifetime of this function.
|
|
|
if (!check_file(cmd + 4)) {
|
|
|
- result = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("File incomplete. Continue anyway?"), false, false);////MSG_FILE_INCOMPLETE c=20 r=3
|
|
|
- lcd_update_enable(true);
|
|
|
+ result = !lcd_show_fullscreen_message_yes_no_and_wait_P(_i("File incomplete. Continue anyway?"), false, false);////MSG_FILE_INCOMPLETE c=20 r=3
|
|
|
}
|
|
|
if (result) {
|
|
|
enquecommand(cmd);
|