repaired nozzle runout prevention to not collide with automatic stepper disabeling.
This commit is contained in:
parent
88ee053af0
commit
01001b89d2
@ -157,9 +157,8 @@
|
|||||||
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
|
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
|
||||||
//#define EXTRUDER_RUNOUT_PREVENT
|
//#define EXTRUDER_RUNOUT_PREVENT
|
||||||
#define EXTRUDER_RUNOUT_MINTEMP 190
|
#define EXTRUDER_RUNOUT_MINTEMP 190
|
||||||
#define EXTRUDER_RUNOUT_SECONDS 60.
|
#define EXTRUDER_RUNOUT_SECONDS 30.
|
||||||
#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
|
#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
|
||||||
#define EXTRUDER_RUNOUT_EXTRUDE 50. //mm filament
|
|
||||||
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
|
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,7 +235,9 @@ void setup()
|
|||||||
SERIAL_PROTOCOLLNPGM("start");
|
SERIAL_PROTOCOLLNPGM("start");
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOPGM("Free Memory:");
|
SERIAL_ECHOPGM("Free Memory:");
|
||||||
SERIAL_ECHOLN(freeMemory());
|
SERIAL_ECHO(freeMemory());
|
||||||
|
SERIAL_ECHOPGM(" PlannerBufferBytes:");
|
||||||
|
SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
|
||||||
for(int8_t i = 0; i < BUFSIZE; i++)
|
for(int8_t i = 0; i < BUFSIZE; i++)
|
||||||
{
|
{
|
||||||
fromsd[i] = false;
|
fromsd[i] = false;
|
||||||
@ -1207,6 +1209,7 @@ void manage_inactivity(byte debug)
|
|||||||
last_stepperdisabled_time=previous_millis_cmd;
|
last_stepperdisabled_time=previous_millis_cmd;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if( (X_ENABLE_ON && (READ(X_ENABLE_PIN)!=0)) || (!X_ENABLE_ON && READ(X_ENABLE_PIN)==0) )
|
||||||
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
||||||
last_stepperdisabled_time=millis();
|
last_stepperdisabled_time=millis();
|
||||||
}
|
}
|
||||||
@ -1215,6 +1218,7 @@ void manage_inactivity(byte debug)
|
|||||||
if( (millis()-previous_millis_cmd) > EXTRUDER_RUNOUT_SECONDS*1000 )
|
if( (millis()-previous_millis_cmd) > EXTRUDER_RUNOUT_SECONDS*1000 )
|
||||||
if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
|
if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
|
||||||
{
|
{
|
||||||
|
bool oldstatus=READ(E_ENABLE_PIN);
|
||||||
enable_e();
|
enable_e();
|
||||||
float oldepos=current_position[E_AXIS];
|
float oldepos=current_position[E_AXIS];
|
||||||
float oldedes=destination[E_AXIS];
|
float oldedes=destination[E_AXIS];
|
||||||
@ -1225,7 +1229,9 @@ void manage_inactivity(byte debug)
|
|||||||
destination[E_AXIS]=oldedes;
|
destination[E_AXIS]=oldedes;
|
||||||
plan_set_e_position(oldepos);
|
plan_set_e_position(oldepos);
|
||||||
previous_millis_cmd=millis();
|
previous_millis_cmd=millis();
|
||||||
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
//enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
||||||
|
st_synchronize();
|
||||||
|
WRITE(E_ENABLE_PIN,oldstatus);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
check_axes_activity();
|
check_axes_activity();
|
||||||
|
Loading…
Reference in New Issue
Block a user