Fix stepper inactivity timeout

This commit is contained in:
Alex Voinea 2023-05-13 08:18:39 +02:00
parent 162f8b4cc8
commit 0612a38885
No known key found for this signature in database
GPG Key ID: 37EDFD565CB33BAD
1 changed files with 8 additions and 12 deletions

View File

@ -9299,18 +9299,14 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
get_command();
}
if(previous_millis_cmd.expired(max_inactive_time))
if(max_inactive_time)
kill(PSTR("Inactivity Shutdown"));
if(stepper_inactive_time) {
if(previous_millis_cmd.expired(stepper_inactive_time))
{
if(blocks_queued() == false && ignore_stepper_queue == false) {
disable_x();
disable_y();
disable_z();
disable_e0();
}
if(max_inactive_time && previous_millis_cmd.expired(max_inactive_time))
kill(PSTR("Inactivity Shutdown"));
if(stepper_inactive_time && previous_millis_cmd.expired(stepper_inactive_time)) {
if(blocks_queued() == false && ignore_stepper_queue == false) {
disable_x();
disable_y();
disable_z();
disable_e0();
}
}