repaired nozzle runout prevention to not collide with automatic stepper disabeling.

master
Bernhard 13 years ago
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
//#define EXTRUDER_RUNOUT_PREVENT
#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_EXTRUDE 50. //mm filament
#define EXTRUDER_RUNOUT_SPEED 1500. //extrusion speed

@ -235,7 +235,9 @@ void setup()
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START;
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++)
{
fromsd[i] = false;
@ -1207,7 +1209,8 @@ void manage_inactivity(byte debug)
last_stepperdisabled_time=previous_millis_cmd;
else
{
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
if( (X_ENABLE_ON && (READ(X_ENABLE_PIN)!=0)) || (!X_ENABLE_ON && READ(X_ENABLE_PIN)==0) )
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
last_stepperdisabled_time=millis();
}
}
@ -1215,6 +1218,7 @@ void manage_inactivity(byte debug)
if( (millis()-previous_millis_cmd) > EXTRUDER_RUNOUT_SECONDS*1000 )
if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
{
bool oldstatus=READ(E_ENABLE_PIN);
enable_e();
float oldepos=current_position[E_AXIS];
float oldedes=destination[E_AXIS];
@ -1225,7 +1229,9 @@ void manage_inactivity(byte debug)
destination[E_AXIS]=oldedes;
plan_set_e_position(oldepos);
previous_millis_cmd=millis();
enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
//enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
st_synchronize();
WRITE(E_ENABLE_PIN,oldstatus);
}
#endif
check_axes_activity();

Loading…
Cancel
Save