Use ENABLED with DISABLE_[INACTIVE_][XYZ]

This commit is contained in:
Scott Lahteine 2016-03-13 22:15:45 -07:00
parent 73a59a4e45
commit 4b648793f2
2 changed files with 21 additions and 13 deletions

View file

@ -6999,16 +6999,16 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time
&& !ignore_stepper_queue && !blocks_queued()) { && !ignore_stepper_queue && !blocks_queued()) {
#if DISABLE_INACTIVE_X == true #if ENABLED(DISABLE_INACTIVE_X)
disable_x(); disable_x();
#endif #endif
#if DISABLE_INACTIVE_Y == true #if ENABLED(DISABLE_INACTIVE_Y)
disable_y(); disable_y();
#endif #endif
#if DISABLE_INACTIVE_Z == true #if ENABLED(DISABLE_INACTIVE_Z)
disable_z(); disable_z();
#endif #endif
#if DISABLE_INACTIVE_E == true #if ENABLED(DISABLE_INACTIVE_E)
disable_e0(); disable_e0();
disable_e1(); disable_e1();
disable_e2(); disable_e2();

View file

@ -421,15 +421,23 @@ void check_axes_activity() {
block_index = next_block_index(block_index); block_index = next_block_index(block_index);
} }
} }
if (DISABLE_X && !axis_active[X_AXIS]) disable_x(); #if ENABLED(DISABLE_X)
if (DISABLE_Y && !axis_active[Y_AXIS]) disable_y(); if (!axis_active[X_AXIS]) disable_x();
if (DISABLE_Z && !axis_active[Z_AXIS]) disable_z(); #endif
if (DISABLE_E && !axis_active[E_AXIS]) { #if ENABLED(DISABLE_Y)
if (!axis_active[Y_AXIS]) disable_y();
#endif
#if ENABLED(DISABLE_Z)
if (!axis_active[Z_AXIS]) disable_z();
#endif
#if ENABLED(DISABLE_E)
if (!axis_active[E_AXIS]) {
disable_e0(); disable_e0();
disable_e1(); disable_e1();
disable_e2(); disable_e2();
disable_e3(); disable_e3();
} }
#endif
#if HAS_FAN #if HAS_FAN
#ifdef FAN_KICKSTART_TIME #ifdef FAN_KICKSTART_TIME