Preheat nozzle before loading filament in M600 (change filament) gcode.
This fixes problem of not heating the nozzle when retrying load after MMU load failed.
This commit is contained in:
parent
27f69bb761
commit
b2255c8be9
|
|
@ -493,5 +493,5 @@ void proc_commands();
|
||||||
void M600_load_filament();
|
void M600_load_filament();
|
||||||
void M600_load_filament_movements();
|
void M600_load_filament_movements();
|
||||||
void M600_wait_for_user(float HotendTempBckp);
|
void M600_wait_for_user(float HotendTempBckp);
|
||||||
void M600_check_state();
|
void M600_check_state(float nozzle_temp);
|
||||||
void load_filament_final_feed();
|
void load_filament_final_feed();
|
||||||
|
|
|
||||||
|
|
@ -3040,12 +3040,12 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
|
||||||
manage_response(false, false);
|
manage_response(false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mmu_M600_load_filament(automatic);
|
mmu_M600_load_filament(automatic, HotendTempBckp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
M600_load_filament();
|
M600_load_filament();
|
||||||
|
|
||||||
if (!automatic) M600_check_state();
|
if (!automatic) M600_check_state(HotendTempBckp);
|
||||||
|
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
|
|
||||||
|
|
@ -9090,7 +9090,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void M600_check_state()
|
//! @par nozzle_temp nozzle temperature to load filament
|
||||||
|
void M600_check_state(float nozzle_temp)
|
||||||
{
|
{
|
||||||
//Wait for user to check the state
|
//Wait for user to check the state
|
||||||
lcd_change_fil_state = 0;
|
lcd_change_fil_state = 0;
|
||||||
|
|
@ -9103,7 +9104,7 @@ void M600_check_state()
|
||||||
// Filament failed to load so load it again
|
// Filament failed to load so load it again
|
||||||
case 2:
|
case 2:
|
||||||
if (mmu_enabled)
|
if (mmu_enabled)
|
||||||
mmu_M600_load_filament(false); //nonautomatic load; change to "wrong filament loaded" option?
|
mmu_M600_load_filament(false, nozzle_temp); //nonautomatic load; change to "wrong filament loaded" option?
|
||||||
else
|
else
|
||||||
M600_load_filament_movements();
|
M600_load_filament_movements();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -830,9 +830,10 @@ void mmu_M600_wait_and_beep() {
|
||||||
WRITE(BEEPER, LOW);
|
WRITE(BEEPER, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mmu_M600_load_filament(bool automatic)
|
//! @brief load filament for mmu v2
|
||||||
|
//! @par nozzle_temp nozzle temperature to load filament
|
||||||
|
void mmu_M600_load_filament(bool automatic, float nozzle_temp)
|
||||||
{
|
{
|
||||||
//load filament for mmu v2
|
|
||||||
tmp_extruder = mmu_extruder;
|
tmp_extruder = mmu_extruder;
|
||||||
if (!automatic) {
|
if (!automatic) {
|
||||||
#ifdef MMU_M600_SWITCH_EXTRUDER
|
#ifdef MMU_M600_SWITCH_EXTRUDER
|
||||||
|
|
@ -852,6 +853,9 @@ void mmu_M600_load_filament(bool automatic)
|
||||||
|
|
||||||
// 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);
|
||||||
|
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);
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ extern void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move =
|
||||||
|
|
||||||
extern void mmu_load_to_nozzle();
|
extern void mmu_load_to_nozzle();
|
||||||
|
|
||||||
extern void mmu_M600_load_filament(bool automatic);
|
extern void mmu_M600_load_filament(bool automatic, float nozzle_temp);
|
||||||
extern void mmu_M600_wait_and_beep();
|
extern void mmu_M600_wait_and_beep();
|
||||||
|
|
||||||
extern void extr_mov(float shift, float feed_rate);
|
extern void extr_mov(float shift, float feed_rate);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue