|
|
@ -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();
|
|
|
|