Commit a2bbff0f authored by MagoKimbra's avatar MagoKimbra

Fix filament_changing

parent 046d5eff
...@@ -331,7 +331,7 @@ uint8_t debugLevel = 0; ...@@ -331,7 +331,7 @@ uint8_t debugLevel = 0;
int EtoPPressure = 0; int EtoPPressure = 0;
#endif //BARICUDA #endif //BARICUDA
#if defined(FILAMENTCHANGEENABLE) || defined(IDLE_OOZING_PREVENT) #ifdef FILAMENTCHANGEENABLE
bool filament_changing = false; bool filament_changing = false;
#endif #endif
...@@ -6563,27 +6563,35 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s ...@@ -6563,27 +6563,35 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
#endif #endif
#ifdef IDLE_OOZING_PREVENT #ifdef IDLE_OOZING_PREVENT
if(!debugDryrun() && !axis_is_moving && !filament_changing && (millis() - axis_last_activity) > IDLE_OOZING_SECONDS*1000 && degHotend(active_extruder) > IDLE_OOZING_MINTEMP) { if (!debugDryrun() && !axis_is_moving && (millis() - axis_last_activity) > IDLE_OOZING_SECONDS * 1000 && degHotend(active_extruder) > IDLE_OOZING_MINTEMP) {
#ifdef FILAMENTCHANGEENABLE
if (!filament_changing)
#endif
IDLE_OOZING_retract(true); IDLE_OOZING_retract(true);
} }
#endif #endif
#ifdef EXTRUDER_RUNOUT_PREVENT #ifdef EXTRUDER_RUNOUT_PREVENT
if(!debugDryrun() && !axis_is_moving && !filament_changing && (millis() - axis_last_activity) > EXTRUDER_RUNOUT_SECONDS*1000 && degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP) if (!debugDryrun() && !axis_is_moving && (millis() - axis_last_activity) > EXTRUDER_RUNOUT_SECONDS * 1000 && degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP)
{ {
bool oldstatus=READ(E0_ENABLE_PIN); #ifdef FILAMENTCHANGEENABLE
if (!filament_changing)
#endif
{
bool oldstatus = READ(E0_ENABLE_PIN);
enable_e0(); enable_e0();
float oldepos=current_position[E_AXIS]; float oldepos = current_position[E_AXIS];
float oldedes=destination[E_AXIS]; float oldedes = destination[E_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
destination[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[active_extruder+3], destination[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS + active_extruder],
EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[active_extruder+3], active_extruder, active_driver); EXTRUDER_RUNOUT_SPEED / 60 * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS + active_extruder], active_extruder, active_driver);
current_position[E_AXIS]=oldepos; current_position[E_AXIS] = oldepos;
destination[E_AXIS]=oldedes; destination[E_AXIS] = oldedes;
plan_set_e_position(oldepos); plan_set_e_position(oldepos);
st_synchronize(); st_synchronize();
WRITE(E0_ENABLE_PIN,oldstatus); WRITE(E0_ENABLE_PIN,oldstatus);
} }
}
#endif #endif
#if defined(DUAL_X_CARRIAGE) #if defined(DUAL_X_CARRIAGE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment