Parcourir la source

fixed z-disable bug.

Erik van der Zalm il y a 12 ans
Parent
révision
abb7e63906
2 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 4
    4
      Marlin/planner.cpp
  2. 2
    1
      Marlin/stepper.cpp

+ 4
- 4
Marlin/planner.cpp Voir le fichier

@@ -430,9 +430,7 @@ void check_axes_activity() {
430 430
   }
431 431
   if((DISABLE_X) && (x_active == 0)) disable_x();
432 432
   if((DISABLE_Y) && (y_active == 0)) disable_y();
433
-  #ifndef Z_LATE_ENABLE
434
-    if((DISABLE_Z) && (z_active == 0)) disable_z();
435
-  #endif
433
+  if((DISABLE_Z) && (z_active == 0)) disable_z();
436 434
   if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
437 435
 }
438 436
 
@@ -507,7 +505,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
507 505
   //enable active axes
508 506
   if(block->steps_x != 0) enable_x();
509 507
   if(block->steps_y != 0) enable_y();
510
-//  if(block->steps_z != 0) enable_z();
508
+  #ifndef Z_LATE_ENABLE
509
+    if(block->steps_z != 0) enable_z();
510
+  #endif
511 511
 
512 512
   // Enable all
513 513
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }

+ 2
- 1
Marlin/stepper.cpp Voir le fichier

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

Chargement…
Annuler
Enregistrer