Change formatting.

This commit is contained in:
Marek Bel 2019-03-04 22:17:43 +01:00
parent b2255c8be9
commit f161d3ade4
2 changed files with 61 additions and 57 deletions

View File

@ -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); 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 //! @par nozzle_temp nozzle temperature to load filament
void M600_check_state(float nozzle_temp) void M600_check_state(float nozzle_temp)
{ {
//Wait for user to check the state lcd_change_fil_state = 0;
lcd_change_fil_state = 0; while (lcd_change_fil_state != 1)
while (lcd_change_fil_state != 1){ {
lcd_change_fil_state = 0; lcd_change_fil_state = 0;
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
lcd_alright(); lcd_alright();
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
switch(lcd_change_fil_state){ switch(lcd_change_fil_state)
// Filament failed to load so load it again {
case 2: // Filament failed to load so load it again
if (mmu_enabled) case 2:
mmu_M600_load_filament(false, nozzle_temp); //nonautomatic load; change to "wrong filament loaded" option? if (mmu_enabled)
else mmu_M600_load_filament(false, nozzle_temp); //nonautomatic load; change to "wrong filament loaded" option?
M600_load_filament_movements(); else
break; M600_load_filament_movements();
break;
// Filament loaded properly but color is not clear // Filament loaded properly but color is not clear
case 3: case 3:
st_synchronize(); st_synchronize();
load_filament_final_feed(); load_filament_final_feed();
lcd_loading_color(); lcd_loading_color();
st_synchronize(); st_synchronize();
break; break;
// Everything good // Everything good
default: default:
lcd_change_success(); lcd_change_success();
break; break;
} }
} }
} }
//! @brief Wait for user action //! @brief Wait for user action

View File

@ -834,37 +834,39 @@ void mmu_M600_wait_and_beep() {
//! @par nozzle_temp nozzle temperature to load filament //! @par nozzle_temp nozzle temperature to load filament
void mmu_M600_load_filament(bool automatic, float nozzle_temp) void mmu_M600_load_filament(bool automatic, float nozzle_temp)
{ {
tmp_extruder = mmu_extruder; tmp_extruder = mmu_extruder;
if (!automatic) { 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); #ifdef MMU_M600_SWITCH_EXTRUDER
if(yes) tmp_extruder = choose_extruder_menu(); bool yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false);
#endif //MMU_M600_SWITCH_EXTRUDER if(yes) tmp_extruder = choose_extruder_menu();
} #endif //MMU_M600_SWITCH_EXTRUDER
else { }
tmp_extruder = ad_getAlternative(tmp_extruder); else
} {
lcd_update_enable(false); tmp_extruder = ad_getAlternative(tmp_extruder);
lcd_clear(); }
lcd_set_cursor(0, 1); lcd_puts_P(_T(MSG_LOADING_FILAMENT)); lcd_update_enable(false);
lcd_print(" "); lcd_clear();
lcd_print(tmp_extruder + 1); lcd_set_cursor(0, 1); lcd_puts_P(_T(MSG_LOADING_FILAMENT));
snmm_filaments_used |= (1 << tmp_extruder); //for stop print 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); //printf_P(PSTR("T code: %d \n"), tmp_extruder);
// mmu_printf_P(PSTR("T%d\n"), tmp_extruder); //mmu_printf_P(PSTR("T%d\n"), tmp_extruder);
setTargetHotend(nozzle_temp,active_extruder); setTargetHotend(nozzle_temp,active_extruder);
mmu_wait_for_heater_blocking(); mmu_wait_for_heater_blocking();
mmu_command(MmuCmd::T0 + tmp_extruder); mmu_command(MmuCmd::T0 + tmp_extruder);
manage_response(false, true, MMU_LOAD_MOVE); manage_response(false, true, MMU_LOAD_MOVE);
mmu_continue_loading(); mmu_continue_loading();
mmu_extruder = tmp_extruder; //filament change is finished mmu_extruder = tmp_extruder; //filament change is finished
mmu_load_to_nozzle(); mmu_load_to_nozzle();
load_filament_final_feed(); load_filament_final_feed();
st_synchronize(); st_synchronize();
} }