patch "step_remaining"

This commit is contained in:
Scott Lahteine 2017-03-13 08:39:04 -05:00
parent 34d3ed9ab1
commit d6db7a9b03

View File

@ -346,8 +346,6 @@ ISR(TIMER1_COMPA_vect) {
void Stepper::isr() { void Stepper::isr() {
static uint32_t step_remaining = 0;
uint16_t ocr_val; uint16_t ocr_val;
#define ENDSTOP_NOMINAL_OCR_VAL 3000 // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch #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) #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
#define SPLIT(L) _SPLIT(L) #define SPLIT(L) _SPLIT(L)
#else // sample endstops in between step pulses #else // sample endstops in between step pulses
static uint32_t step_remaining = 0;
#define SPLIT(L) do { \ #define SPLIT(L) do { \
_SPLIT(L); \ _SPLIT(L); \
if (ENDSTOPS_ENABLED && L > ENDSTOP_NOMINAL_OCR_VAL) { \ if (ENDSTOPS_ENABLED && L > ENDSTOP_NOMINAL_OCR_VAL) { \