Sfoglia il codice sorgente

Merge pull request #3963 from thinkyhead/rc_advance_steppers

Use e_steps[EXTRUDERS] instead of e_steps[4]
Scott Lahteine 8 anni fa
parent
commit
5e6fdbb4cb
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2
    2
      Marlin/stepper.cpp
  2. 1
    1
      Marlin/stepper.h

+ 2
- 2
Marlin/stepper.cpp Vedi File

@@ -93,7 +93,7 @@ volatile unsigned long Stepper::step_events_completed = 0; // The number of step
93 93
   unsigned char Stepper::old_OCR0A;
94 94
   long  Stepper::final_advance = 0,
95 95
         Stepper::old_advance = 0,
96
-        Stepper::e_steps[4],
96
+        Stepper::e_steps[EXTRUDERS],
97 97
         Stepper::advance_rate,
98 98
         Stepper::advance;
99 99
 #endif
@@ -661,7 +661,7 @@ void Stepper::init() {
661 661
       CBI(TCCR0A, WGM01);
662 662
       CBI(TCCR0A, WGM00);
663 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 665
     SBI(TIMSK0, OCIE0A);
666 666
   #endif //ADVANCE
667 667
 

+ 1
- 1
Marlin/stepper.h Vedi File

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

Loading…
Annulla
Salva