From: Erik van der Zalm Date: Sun, 5 Feb 2012 20:14:55 +0000 (+0100) Subject: fixed z-disable bug. X-Git-Tag: iwj-success-2012-07-29~124 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=abb7e639067677257d9409728f1370dcf24e5923;p=marlin.git fixed z-disable bug. --- diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index cfa478c..85c82ae 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -430,9 +430,7 @@ void check_axes_activity() { } if((DISABLE_X) && (x_active == 0)) disable_x(); if((DISABLE_Y) && (y_active == 0)) disable_y(); - #ifndef Z_LATE_ENABLE - if((DISABLE_Z) && (z_active == 0)) disable_z(); - #endif + if((DISABLE_Z) && (z_active == 0)) disable_z(); if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); } } @@ -507,7 +505,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa //enable active axes if(block->steps_x != 0) enable_x(); if(block->steps_y != 0) enable_y(); -// if(block->steps_z != 0) enable_z(); + #ifndef Z_LATE_ENABLE + if(block->steps_z != 0) enable_z(); + #endif // Enable all if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); } diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 69d4335..a32dd8d 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -274,7 +274,8 @@ FORCE_INLINE void trapezoid_generator_reset() { acceleration_time = calc_timer(acc_step_rate); OCR1A = acceleration_time; OCR1A_nominal = calc_timer(current_block->nominal_rate); - #ifdef Z_LATE_ENABLE + + #ifdef Z_LATE_ENABLE if(current_block->steps_z > 0) enable_z(); #endif