From 87f416f3034969a9099b4185c68258ad4806a917 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Thu, 18 Feb 2021 15:39:29 +0100 Subject: [PATCH] Keep wizard flag==2 even when a user restarts during Z-calibration i.e. prevent jumping into the standard wizard if reset during Z- calibration --- Firmware/ultralcd.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 610334e58..09414c1bb 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4988,17 +4988,16 @@ void lcd_wizard(WizState state) if( eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)==2){ lcd_show_fullscreen_message_and_wait_P(_i("Hi, I am your Original Prusa i3 printer. I will guide you through a short setup process, in which the Z-axis will be calibrated. Then, you will be ready to print."));////MSG_WIZARD_WELCOME_SHIPPING c=20 r=7 - wizard_event = 1; + state = S::Restore; } else { wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"), false, true);////MSG_WIZARD_WELCOME c=20 r=7 - } - if (wizard_event) { - state = S::Restore; - eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1); - } - else { - eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0); - end = true; + if (wizard_event) { + state = S::Restore; + eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1); + } else { + eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0); + end = true; + } } break; case S::Restore: