From d6db7a9b03fc32ac6e974cdb2ba0e158ccc79e49 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 13 Mar 2017 08:39:04 -0500 Subject: [PATCH] patch "step_remaining" --- Marlin/stepper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 9cbb794aa..cf7d1c23a 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -346,8 +346,6 @@ ISR(TIMER1_COMPA_vect) { void Stepper::isr() { - static uint32_t step_remaining = 0; - uint16_t ocr_val; #define ENDSTOP_NOMINAL_OCR_VAL 3000 // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch @@ -364,6 +362,7 @@ void Stepper::isr() { #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) #define SPLIT(L) _SPLIT(L) #else // sample endstops in between step pulses + static uint32_t step_remaining = 0; #define SPLIT(L) do { \ _SPLIT(L); \ if (ENDSTOPS_ENABLED && L > ENDSTOP_NOMINAL_OCR_VAL) { \ @@ -391,7 +390,7 @@ void Stepper::isr() { _ENABLE_ISRs(); // re-enable ISRs return; } - # endif + #endif if (cleaning_buffer_counter) { --cleaning_buffer_counter;