Browse Source

Fix Z_LATE_ENABLE

Erik van der Zalm 12 years ago
parent
commit
292ddd2edb
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      Marlin/stepper.cpp

+ 9
- 3
Marlin/stepper.cpp View File

@@ -275,9 +275,7 @@ FORCE_INLINE void trapezoid_generator_reset() {
275 275
   OCR1A = acceleration_time;
276 276
   OCR1A_nominal = calc_timer(current_block->nominal_rate);
277 277
   
278
-  #ifdef Z_LATE_ENABLE 
279
-    if(current_block->steps_z > 0) enable_z();
280
-  #endif
278
+
281 279
   
282 280
 //    SERIAL_ECHO_START;
283 281
 //    SERIAL_ECHOPGM("advance :");
@@ -306,6 +304,14 @@ ISR(TIMER1_COMPA_vect)
306 304
       counter_z = counter_x;
307 305
       counter_e = counter_x;
308 306
       step_events_completed = 0;
307
+      #ifdef Z_LATE_ENABLE 
308
+        if(current_block->steps_z > 0) {
309
+          enable_z();
310
+          OCR1A = 2000; //1ms wait
311
+          return;
312
+        }
313
+      #endif
314
+      
309 315
 //      #ifdef ADVANCE
310 316
 //      e_steps[current_block->active_extruder] = 0;
311 317
 //      #endif

Loading…
Cancel
Save