Change formatting.
This commit is contained in:
parent
b2255c8be9
commit
f161d3ade4
|
|
@ -9090,39 +9090,41 @@ void load_filament_final_feed()
|
|||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_EFEED_FINAL, active_extruder);
|
||||
}
|
||||
|
||||
//! @brief Wait for user to check the state
|
||||
//! @par nozzle_temp nozzle temperature to load filament
|
||||
void M600_check_state(float nozzle_temp)
|
||||
{
|
||||
//Wait for user to check the state
|
||||
lcd_change_fil_state = 0;
|
||||
while (lcd_change_fil_state != 1){
|
||||
lcd_change_fil_state = 0;
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
lcd_alright();
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
switch(lcd_change_fil_state){
|
||||
// Filament failed to load so load it again
|
||||
case 2:
|
||||
if (mmu_enabled)
|
||||
mmu_M600_load_filament(false, nozzle_temp); //nonautomatic load; change to "wrong filament loaded" option?
|
||||
else
|
||||
M600_load_filament_movements();
|
||||
break;
|
||||
lcd_change_fil_state = 0;
|
||||
while (lcd_change_fil_state != 1)
|
||||
{
|
||||
lcd_change_fil_state = 0;
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
lcd_alright();
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
switch(lcd_change_fil_state)
|
||||
{
|
||||
// Filament failed to load so load it again
|
||||
case 2:
|
||||
if (mmu_enabled)
|
||||
mmu_M600_load_filament(false, nozzle_temp); //nonautomatic load; change to "wrong filament loaded" option?
|
||||
else
|
||||
M600_load_filament_movements();
|
||||
break;
|
||||
|
||||
// Filament loaded properly but color is not clear
|
||||
case 3:
|
||||
st_synchronize();
|
||||
load_filament_final_feed();
|
||||
lcd_loading_color();
|
||||
st_synchronize();
|
||||
break;
|
||||
|
||||
// Everything good
|
||||
default:
|
||||
lcd_change_success();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Filament loaded properly but color is not clear
|
||||
case 3:
|
||||
st_synchronize();
|
||||
load_filament_final_feed();
|
||||
lcd_loading_color();
|
||||
st_synchronize();
|
||||
break;
|
||||
|
||||
// Everything good
|
||||
default:
|
||||
lcd_change_success();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! @brief Wait for user action
|
||||
|
|
|
|||
|
|
@ -834,37 +834,39 @@ void mmu_M600_wait_and_beep() {
|
|||
//! @par nozzle_temp nozzle temperature to load filament
|
||||
void mmu_M600_load_filament(bool automatic, float nozzle_temp)
|
||||
{
|
||||
tmp_extruder = mmu_extruder;
|
||||
if (!automatic) {
|
||||
#ifdef MMU_M600_SWITCH_EXTRUDER
|
||||
bool yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false);
|
||||
if(yes) tmp_extruder = choose_extruder_menu();
|
||||
#endif //MMU_M600_SWITCH_EXTRUDER
|
||||
}
|
||||
else {
|
||||
tmp_extruder = ad_getAlternative(tmp_extruder);
|
||||
}
|
||||
lcd_update_enable(false);
|
||||
lcd_clear();
|
||||
lcd_set_cursor(0, 1); lcd_puts_P(_T(MSG_LOADING_FILAMENT));
|
||||
lcd_print(" ");
|
||||
lcd_print(tmp_extruder + 1);
|
||||
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
||||
tmp_extruder = mmu_extruder;
|
||||
if (!automatic)
|
||||
{
|
||||
#ifdef MMU_M600_SWITCH_EXTRUDER
|
||||
bool yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false);
|
||||
if(yes) tmp_extruder = choose_extruder_menu();
|
||||
#endif //MMU_M600_SWITCH_EXTRUDER
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_extruder = ad_getAlternative(tmp_extruder);
|
||||
}
|
||||
lcd_update_enable(false);
|
||||
lcd_clear();
|
||||
lcd_set_cursor(0, 1); lcd_puts_P(_T(MSG_LOADING_FILAMENT));
|
||||
lcd_print(" ");
|
||||
lcd_print(tmp_extruder + 1);
|
||||
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
||||
|
||||
// printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
||||
// mmu_printf_P(PSTR("T%d\n"), tmp_extruder);
|
||||
setTargetHotend(nozzle_temp,active_extruder);
|
||||
mmu_wait_for_heater_blocking();
|
||||
//printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
||||
//mmu_printf_P(PSTR("T%d\n"), tmp_extruder);
|
||||
setTargetHotend(nozzle_temp,active_extruder);
|
||||
mmu_wait_for_heater_blocking();
|
||||
|
||||
mmu_command(MmuCmd::T0 + tmp_extruder);
|
||||
mmu_command(MmuCmd::T0 + tmp_extruder);
|
||||
|
||||
manage_response(false, true, MMU_LOAD_MOVE);
|
||||
mmu_continue_loading();
|
||||
mmu_extruder = tmp_extruder; //filament change is finished
|
||||
|
||||
mmu_load_to_nozzle();
|
||||
load_filament_final_feed();
|
||||
st_synchronize();
|
||||
manage_response(false, true, MMU_LOAD_MOVE);
|
||||
mmu_continue_loading();
|
||||
mmu_extruder = tmp_extruder; //filament change is finished
|
||||
|
||||
mmu_load_to_nozzle();
|
||||
load_filament_final_feed();
|
||||
st_synchronize();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue