|
@@ -346,8 +346,6 @@ ISR(TIMER1_COMPA_vect) {
|
346
|
346
|
|
347
|
347
|
void Stepper::isr() {
|
348
|
348
|
|
349
|
|
- static uint32_t step_remaining = 0;
|
350
|
|
-
|
351
|
349
|
uint16_t ocr_val;
|
352
|
350
|
|
353
|
351
|
#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() {
|
364
|
362
|
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
365
|
363
|
#define SPLIT(L) _SPLIT(L)
|
366
|
364
|
#else // sample endstops in between step pulses
|
|
365
|
+ static uint32_t step_remaining = 0;
|
367
|
366
|
#define SPLIT(L) do { \
|
368
|
367
|
_SPLIT(L); \
|
369
|
368
|
if (ENDSTOPS_ENABLED && L > ENDSTOP_NOMINAL_OCR_VAL) { \
|
|
@@ -391,7 +390,7 @@ void Stepper::isr() {
|
391
|
390
|
_ENABLE_ISRs(); // re-enable ISRs
|
392
|
391
|
return;
|
393
|
392
|
}
|
394
|
|
- # endif
|
|
393
|
+ #endif
|
395
|
394
|
|
396
|
395
|
if (cleaning_buffer_counter) {
|
397
|
396
|
--cleaning_buffer_counter;
|