Преглед изворни кода

Fix bogus timer check preventing fast LA steps to be scheduled

Simplify and fix the broken timer check when scheduling advance ticks.
This dates back to the original LA15 PR, an old bug...
Yuri D'Elia пре 3 година
родитељ
комит
173aa2deba
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Firmware/stepper.cpp

+ 1 - 1
Firmware/stepper.cpp

@@ -1016,7 +1016,7 @@ FORCE_INLINE void advance_isr_scheduler() {
 
 
     // Schedule the next closest tick, ignoring advance if scheduled too
     // Schedule the next closest tick, ignoring advance if scheduled too
     // soon in order to avoid skewing the regular stepper acceleration
     // soon in order to avoid skewing the regular stepper acceleration
-    if (nextAdvanceISR != ADV_NEVER && (nextAdvanceISR + TCNT1 + 40) < nextMainISR)
+    if (nextAdvanceISR != ADV_NEVER && (nextAdvanceISR + 40) < nextMainISR)
         OCR1A = nextAdvanceISR;
         OCR1A = nextAdvanceISR;
     else
     else
         OCR1A = nextMainISR;
         OCR1A = nextMainISR;