Merge branch 'MK3_dev' into fix_mmu_1st_lay_cal

This commit is contained in:
Marek Bel 2018-09-11 15:26:35 +02:00
commit 0fcd2cf2a1
3 changed files with 13 additions and 5 deletions

View File

@ -363,6 +363,8 @@ extern uint16_t print_time_remaining_silent;
extern uint16_t mcode_in_progress; extern uint16_t mcode_in_progress;
extern uint16_t gcode_in_progress; extern uint16_t gcode_in_progress;
extern bool wizard_active; //autoload temporarily disabled during wizard
#define PRINT_PERCENT_DONE_INIT 0xff #define PRINT_PERCENT_DONE_INIT 0xff
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved) #define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)

View File

@ -476,6 +476,8 @@ uint16_t print_time_remaining_normal = PRINT_TIME_REMAINING_INIT; //estimated re
uint8_t print_percent_done_silent = PRINT_PERCENT_DONE_INIT; uint8_t print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
uint16_t print_time_remaining_silent = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes uint16_t print_time_remaining_silent = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes
bool wizard_active = false; //autoload temporarily disabled during wizard
//=========================================================================== //===========================================================================
//=============================Private Variables============================= //=============================Private Variables=============================
//=========================================================================== //===========================================================================
@ -7330,7 +7332,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
{ {
if (mcode_in_progress != 600) //M600 not in progress if (mcode_in_progress != 600) //M600 not in progress
{ {
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL)) if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active)
{ {
if (fsensor_check_autoload()) if (fsensor_check_autoload())
{ {

View File

@ -4314,8 +4314,10 @@ void lcd_wizard(int state) {
int wizard_event; int wizard_event;
const char *msg = NULL; const char *msg = NULL;
while (!end) { while (!end) {
printf_P(PSTR("Wizard state: %d"), state);
switch (state) { switch (state) {
case 0: // run wizard? case 0: // run wizard?
wizard_active = true;
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 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) { if (wizard_event) {
state = 1; state = 1;
@ -4361,7 +4363,6 @@ void lcd_wizard(int state) {
break; break;
case 5: //is filament loaded? case 5: //is filament loaded?
//start to preheat nozzle and bed to save some time later //start to preheat nozzle and bed to save some time later
lcd_commands_type = LCD_COMMAND_V2_CAL;
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0); setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0);
setTargetBed(PLA_PREHEAT_HPB_TEMP); setTargetBed(PLA_PREHEAT_HPB_TEMP);
if (mmu_enabled) if (mmu_enabled)
@ -4439,7 +4440,7 @@ void lcd_wizard(int state) {
} }
} }
printf_P(_N("State: %d\n"), state); printf_P(_N("Wizard end state: %d\n"), state);
switch (state) { //final message switch (state) { //final message
case 0: //user dont want to use wizard case 0: //user dont want to use wizard
msg = _T(MSG_WIZARD_QUIT); msg = _T(MSG_WIZARD_QUIT);
@ -4473,7 +4474,10 @@ void lcd_wizard(int state) {
break; break;
} }
if (state != 9) lcd_show_fullscreen_message_and_wait_P(msg); if (state != 9) {
lcd_show_fullscreen_message_and_wait_P(msg);
wizard_active = false;
}
lcd_update_enable(true); lcd_update_enable(true);
lcd_return_to_status(); lcd_return_to_status();
lcd_update(2); lcd_update(2);