Merge pull request #4200 from leptun/fix_stepper_inactivity_timeout

Fix stepper inactivity timeout
This commit is contained in:
3d-gussner 2023-05-15 10:34:39 +02:00 committed by GitHub
commit d8ec526e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 12 deletions

View File

@ -9299,12 +9299,9 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
get_command(); get_command();
} }
if(previous_millis_cmd.expired(max_inactive_time)) if(max_inactive_time && previous_millis_cmd.expired(max_inactive_time))
if(max_inactive_time)
kill(PSTR("Inactivity Shutdown")); kill(PSTR("Inactivity Shutdown"));
if(stepper_inactive_time) { if(stepper_inactive_time && previous_millis_cmd.expired(stepper_inactive_time)) {
if(previous_millis_cmd.expired(stepper_inactive_time))
{
if(blocks_queued() == false && ignore_stepper_queue == false) { if(blocks_queued() == false && ignore_stepper_queue == false) {
disable_x(); disable_x();
disable_y(); disable_y();
@ -9312,7 +9309,6 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
disable_e0(); disable_e0();
} }
} }
}
#ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH #ifdef CHDK //Check if pin should be set to LOW after M240 set it to HIGH
if (chdkActive && (_millis() - chdkHigh > CHDK_DELAY)) if (chdkActive && (_millis() - chdkHigh > CHDK_DELAY))