Browse Source

Fix broken direction signal of ADVANCED and LIN_ADVANCED

Remove a setting proccess of E direction in advance_isr()
esenapaj 9 years ago
parent
commit
8692748ecd
1 changed files with 8 additions and 24 deletions
  1. 8
    24
      Marlin/stepper.cpp

+ 8
- 24
Marlin/stepper.cpp View File

299
     SET_STEP_DIR(Z); // C
299
     SET_STEP_DIR(Z); // C
300
   #endif
300
   #endif
301
 
301
 
302
-  #if DISABLED(ADVANCE)
303
-    if (motor_direction(E_AXIS)) {
304
-      REV_E_DIR();
305
-      count_direction[E_AXIS] = -1;
306
-    }
307
-    else {
308
-      NORM_E_DIR();
309
-      count_direction[E_AXIS] = 1;
310
-    }
311
-  #endif //!ADVANCE
302
+  if (motor_direction(E_AXIS)) {
303
+    REV_E_DIR();
304
+    count_direction[E_AXIS] = -1;
305
+  }
306
+  else {
307
+    NORM_E_DIR();
308
+    count_direction[E_AXIS] = 1;
309
+  }
312
 }
310
 }
313
 
311
 
314
 // "The Stepper Driver Interrupt" - This timer interrupt is the workhorse.
312
 // "The Stepper Driver Interrupt" - This timer interrupt is the workhorse.
683
     old_OCR0A += eISR_Rate;
681
     old_OCR0A += eISR_Rate;
684
     OCR0A = old_OCR0A;
682
     OCR0A = old_OCR0A;
685
 
683
 
686
-    #define SET_E_STEP_DIR(INDEX) \
687
-      E## INDEX ##_DIR_WRITE(e_steps[INDEX] <= 0 ? INVERT_E## INDEX ##_DIR : !INVERT_E## INDEX ##_DIR)
688
-
689
     #define START_E_PULSE(INDEX) \
684
     #define START_E_PULSE(INDEX) \
690
       if (e_steps[INDEX]) E## INDEX ##_STEP_WRITE(INVERT_E_STEP_PIN)
685
       if (e_steps[INDEX]) E## INDEX ##_STEP_WRITE(INVERT_E_STEP_PIN)
691
 
686
 
695
         E## INDEX ##_STEP_WRITE(!INVERT_E_STEP_PIN); \
690
         E## INDEX ##_STEP_WRITE(!INVERT_E_STEP_PIN); \
696
       }
691
       }
697
 
692
 
698
-    SET_E_STEP_DIR(0);
699
-    #if E_STEPPERS > 1
700
-      SET_E_STEP_DIR(1);
701
-      #if E_STEPPERS > 2
702
-        SET_E_STEP_DIR(2);
703
-        #if E_STEPPERS > 3
704
-          SET_E_STEP_DIR(3);
705
-        #endif
706
-      #endif
707
-    #endif
708
-
709
     // Step all E steppers that have steps
693
     // Step all E steppers that have steps
710
     for (uint8_t i = 0; i < step_loops; i++) {
694
     for (uint8_t i = 0; i < step_loops; i++) {
711
 
695
 

Loading…
Cancel
Save