Skip to content

Commit

Permalink
Fix bogus timer check preventing fast LA steps to be scheduled
Browse files Browse the repository at this point in the history
Simplify and fix the broken timer check when scheduling advance ticks.
This dates back to the original LA15 PR, an old bug...
  • Loading branch information
wavexx committed Jun 21, 2020
1 parent 51a5396 commit 173aa2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Firmware/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ FORCE_INLINE void advance_isr_scheduler() {

// Schedule the next closest tick, ignoring advance if scheduled too
// 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;
else
OCR1A = nextMainISR;
Expand Down

0 comments on commit 173aa2d

Please sign in to comment.