From 45642b7fe8238c573f16a2cf09c4d4bab8c4be46 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Mon, 1 Jun 2015 10:42:28 +0200 Subject: [PATCH] Respect DISABLE_AXIS settings (PR#2216) when DEFAULT_STEPPER_DEACTIVE_TIME is over instead of simply turn off all. --- Marlin/Marlin_main.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b06c1099f..ff34a0aca 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6344,8 +6344,23 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { if (max_inactive_time && ms > previous_cmd_ms + max_inactive_time) kill(PSTR(MSG_KILLED)); if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time - && !ignore_stepper_queue && !blocks_queued()) - disable_all_steppers(); + && !ignore_stepper_queue && !blocks_queued()) { + #if DISABLE_X == true + disable_x(); + #endif + #if DISABLE_Y == true + disable_y(); + #endif + #if DISABLE_Z == true + disable_z(); + #endif + #if DISABLE_E == true + disable_e0(); + disable_e1(); + disable_e2(); + disable_e3(); + #endif + } #ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH if (chdkActive && ms > chdkHigh + CHDK_DELAY) {