Fix mmu_M600_load_filament increments tmp_extruder, which is not set in case of automatic == true.

This commit is contained in:
Marek Bel 2018-08-27 20:23:43 +02:00
parent 2a00e5d348
commit 9611401b69

View file

@ -418,11 +418,10 @@ void mmu_M600_load_filament(bool automatic)
bool response = false;
bool yes = false;
tmp_extruder = mmu_extruder;
if (!automatic) {
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();
else tmp_extruder = mmu_extruder;
}
else {
tmp_extruder = (tmp_extruder+1)%5;
@ -444,6 +443,7 @@ void mmu_M600_load_filament(bool automatic)
mmu_load_to_nozzle();
st_synchronize();
current_position[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2, active_extruder);