Browse Source

Extend the e_steps[] from int to long for allowing more than 32,767 E steps

Probably needed for long straight lines when using high microstepping
esenapaj 8 years ago
parent
commit
7e9576dc5b
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Marlin/stepper.cpp
  2. 1
    1
      Marlin/stepper.h

+ 1
- 1
Marlin/stepper.cpp View File

@@ -95,7 +95,7 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
95 95
   volatile unsigned char Stepper::eISR_Rate = 200; // Keep the ISR at a low rate until needed
96 96
 
97 97
   #if ENABLED(LIN_ADVANCE)
98
-    volatile int Stepper::e_steps[E_STEPPERS];
98
+    volatile long Stepper::e_steps[E_STEPPERS];
99 99
     int Stepper::extruder_advance_k = LIN_ADVANCE_K,
100 100
         Stepper::final_estep_rate,
101 101
         Stepper::current_estep_rate[E_STEPPERS],

+ 1
- 1
Marlin/stepper.h View File

@@ -113,7 +113,7 @@ class Stepper {
113 113
       static unsigned char old_OCR0A;
114 114
       static volatile unsigned char eISR_Rate;
115 115
       #if ENABLED(LIN_ADVANCE)
116
-        static volatile int e_steps[E_STEPPERS];
116
+        static volatile long e_steps[E_STEPPERS];
117 117
         static int extruder_advance_k;
118 118
         static int final_estep_rate;
119 119
         static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]

Loading…
Cancel
Save