Browse Source

fixed z-disable bug.

Erik van der Zalm 12 years ago
parent
commit
abb7e63906
2 changed files with 6 additions and 5 deletions
  1. 4
    4
      Marlin/planner.cpp
  2. 2
    1
      Marlin/stepper.cpp

+ 4
- 4
Marlin/planner.cpp View File

430
   }
430
   }
431
   if((DISABLE_X) && (x_active == 0)) disable_x();
431
   if((DISABLE_X) && (x_active == 0)) disable_x();
432
   if((DISABLE_Y) && (y_active == 0)) disable_y();
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
   if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
434
   if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
437
 }
435
 }
438
 
436
 
507
   //enable active axes
505
   //enable active axes
508
   if(block->steps_x != 0) enable_x();
506
   if(block->steps_x != 0) enable_x();
509
   if(block->steps_y != 0) enable_y();
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
   // Enable all
512
   // Enable all
513
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }
513
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }

+ 2
- 1
Marlin/stepper.cpp View File

274
   acceleration_time = calc_timer(acc_step_rate);
274
   acceleration_time = calc_timer(acc_step_rate);
275
   OCR1A = acceleration_time;
275
   OCR1A = acceleration_time;
276
   OCR1A_nominal = calc_timer(current_block->nominal_rate);
276
   OCR1A_nominal = calc_timer(current_block->nominal_rate);
277
-  #ifdef Z_LATE_ENABLE
277
+  
278
+  #ifdef Z_LATE_ENABLE 
278
     if(current_block->steps_z > 0) enable_z();
279
     if(current_block->steps_z > 0) enable_z();
279
   #endif
280
   #endif
280
   
281
   

Loading…
Cancel
Save