From 7e9576dc5b2f5149d27f6223ef28a152351c515b Mon Sep 17 00:00:00 2001 From: esenapaj Date: Tue, 20 Sep 2016 19:14:48 +0900 Subject: [PATCH] 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 --- Marlin/stepper.cpp | 2 +- Marlin/stepper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index a25f0c76e..d2f47fd46 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -95,7 +95,7 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even volatile unsigned char Stepper::eISR_Rate = 200; // Keep the ISR at a low rate until needed #if ENABLED(LIN_ADVANCE) - volatile int Stepper::e_steps[E_STEPPERS]; + volatile long Stepper::e_steps[E_STEPPERS]; int Stepper::extruder_advance_k = LIN_ADVANCE_K, Stepper::final_estep_rate, Stepper::current_estep_rate[E_STEPPERS], diff --git a/Marlin/stepper.h b/Marlin/stepper.h index d7507aff2..d5de89657 100644 --- a/Marlin/stepper.h +++ b/Marlin/stepper.h @@ -113,7 +113,7 @@ class Stepper { static unsigned char old_OCR0A; static volatile unsigned char eISR_Rate; #if ENABLED(LIN_ADVANCE) - static volatile int e_steps[E_STEPPERS]; + static volatile long e_steps[E_STEPPERS]; static int extruder_advance_k; static int final_estep_rate; static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]