fixed z-disable bug.

This commit is contained in:
Erik van der Zalm 2012-02-05 21:14:55 +01:00
parent 9f139d6e0e
commit abb7e63906
2 changed files with 6 additions and 5 deletions

View File

@ -430,9 +430,7 @@ void check_axes_activity() {
} }
if((DISABLE_X) && (x_active == 0)) disable_x(); if((DISABLE_X) && (x_active == 0)) disable_x();
if((DISABLE_Y) && (y_active == 0)) disable_y(); if((DISABLE_Y) && (y_active == 0)) disable_y();
#ifndef Z_LATE_ENABLE if((DISABLE_Z) && (z_active == 0)) disable_z();
if((DISABLE_Z) && (z_active == 0)) disable_z();
#endif
if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); } 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 //enable active axes
if(block->steps_x != 0) enable_x(); if(block->steps_x != 0) enable_x();
if(block->steps_y != 0) enable_y(); 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 // Enable all
if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); } if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }

View File

@ -274,7 +274,8 @@ FORCE_INLINE void trapezoid_generator_reset() {
acceleration_time = calc_timer(acc_step_rate); acceleration_time = calc_timer(acc_step_rate);
OCR1A = acceleration_time; OCR1A = acceleration_time;
OCR1A_nominal = calc_timer(current_block->nominal_rate); OCR1A_nominal = calc_timer(current_block->nominal_rate);
#ifdef Z_LATE_ENABLE
#ifdef Z_LATE_ENABLE
if(current_block->steps_z > 0) enable_z(); if(current_block->steps_z > 0) enable_z();
#endif #endif