|
@@ -165,7 +165,6 @@ const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
|
165
|
165
|
static unsigned long previous_millis_cmd = 0;
|
166
|
166
|
static unsigned long max_inactive_time = 0;
|
167
|
167
|
static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l;
|
168
|
|
-static unsigned long last_stepperdisabled_time=30*1000; //first release check after 30 seconds
|
169
|
168
|
|
170
|
169
|
static unsigned long starttime=0;
|
171
|
170
|
static unsigned long stoptime=0;
|
|
@@ -1296,16 +1295,15 @@ void manage_inactivity(byte debug)
|
1296
|
1295
|
if( (millis() - previous_millis_cmd) > max_inactive_time )
|
1297
|
1296
|
if(max_inactive_time)
|
1298
|
1297
|
kill();
|
1299
|
|
- if(stepper_inactive_time)
|
1300
|
|
- if( (millis() - last_stepperdisabled_time) > stepper_inactive_time )
|
1301
|
|
- {
|
1302
|
|
- if(previous_millis_cmd>last_stepperdisabled_time)
|
1303
|
|
- last_stepperdisabled_time=previous_millis_cmd;
|
1304
|
|
- else
|
|
1298
|
+ if(stepper_inactive_time) {
|
|
1299
|
+ if( (millis() - previous_millis_cmd) > stepper_inactive_time )
|
1305
|
1300
|
{
|
1306
|
|
- if( (X_ENABLE_ON && (READ(X_ENABLE_PIN)!=0)) || (!X_ENABLE_ON && READ(X_ENABLE_PIN)==0) )
|
1307
|
|
- enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
1308
|
|
- last_stepperdisabled_time=millis();
|
|
1301
|
+ disable_x();
|
|
1302
|
+ disable_y();
|
|
1303
|
+ disable_z();
|
|
1304
|
+ disable_e0();
|
|
1305
|
+ disable_e1();
|
|
1306
|
+ disable_e2();
|
1309
|
1307
|
}
|
1310
|
1308
|
}
|
1311
|
1309
|
#ifdef EXTRUDER_RUNOUT_PREVENT
|
|
@@ -1323,7 +1321,6 @@ void manage_inactivity(byte debug)
|
1323
|
1321
|
destination[E_AXIS]=oldedes;
|
1324
|
1322
|
plan_set_e_position(oldepos);
|
1325
|
1323
|
previous_millis_cmd=millis();
|
1326
|
|
- //enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
|
1327
|
1324
|
st_synchronize();
|
1328
|
1325
|
WRITE(E0_ENABLE_PIN,oldstatus);
|
1329
|
1326
|
}
|