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
   volatile unsigned char Stepper::eISR_Rate = 200; // Keep the ISR at a low rate until needed
95
   volatile unsigned char Stepper::eISR_Rate = 200; // Keep the ISR at a low rate until needed
96
 
96
 
97
   #if ENABLED(LIN_ADVANCE)
97
   #if ENABLED(LIN_ADVANCE)
98
-    volatile int Stepper::e_steps[E_STEPPERS];
98
+    volatile long Stepper::e_steps[E_STEPPERS];
99
     int Stepper::extruder_advance_k = LIN_ADVANCE_K,
99
     int Stepper::extruder_advance_k = LIN_ADVANCE_K,
100
         Stepper::final_estep_rate,
100
         Stepper::final_estep_rate,
101
         Stepper::current_estep_rate[E_STEPPERS],
101
         Stepper::current_estep_rate[E_STEPPERS],

+ 1
- 1
Marlin/stepper.h View File

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

Loading…
Cancel
Save