Browse Source

Merge pull request #3963 from thinkyhead/rc_advance_steppers

Use e_steps[EXTRUDERS] instead of e_steps[4]
Scott Lahteine 8 years ago
parent
commit
5e6fdbb4cb
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      Marlin/stepper.cpp
  2. 1
    1
      Marlin/stepper.h

+ 2
- 2
Marlin/stepper.cpp View File

93
   unsigned char Stepper::old_OCR0A;
93
   unsigned char Stepper::old_OCR0A;
94
   long  Stepper::final_advance = 0,
94
   long  Stepper::final_advance = 0,
95
         Stepper::old_advance = 0,
95
         Stepper::old_advance = 0,
96
-        Stepper::e_steps[4],
96
+        Stepper::e_steps[EXTRUDERS],
97
         Stepper::advance_rate,
97
         Stepper::advance_rate,
98
         Stepper::advance;
98
         Stepper::advance;
99
 #endif
99
 #endif
661
       CBI(TCCR0A, WGM01);
661
       CBI(TCCR0A, WGM01);
662
       CBI(TCCR0A, WGM00);
662
       CBI(TCCR0A, WGM00);
663
     #endif
663
     #endif
664
-    e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = 0;
664
+    for (uint8_t i = 0; i < EXTRUDERS; i++) e_steps[i] = 0;
665
     SBI(TIMSK0, OCIE0A);
665
     SBI(TIMSK0, OCIE0A);
666
   #endif //ADVANCE
666
   #endif //ADVANCE
667
 
667
 

+ 1
- 1
Marlin/stepper.h View File

91
     #endif
91
     #endif
92
 
92
 
93
     #if ENABLED(ADVANCE)
93
     #if ENABLED(ADVANCE)
94
-      static long e_steps[4];
94
+      static long e_steps[EXTRUDERS];
95
     #endif
95
     #endif
96
 
96
 
97
   private:
97
   private:

Loading…
Cancel
Save