Skip to main content
Sign in
Snippets Groups Projects
Commit cfb5c24b authored by esenapaj's avatar esenapaj
Browse files

Small fix for the PR #4980 (LIN_ADVANCE bug fix and optimization)

・Fix a comment about timer
parent f4ec2653
Branches
Tags
No related merge requests found
...@@ -604,7 +604,7 @@ void Stepper::isr() { ...@@ -604,7 +604,7 @@ void Stepper::isr() {
#endif // ADVANCE or LIN_ADVANCE #endif // ADVANCE or LIN_ADVANCE
#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
eISR_Rate = (timer >> 3) * step_loops / abs(e_steps[TOOL_E_INDEX]); //>> 3 is divide by 8. Reason: Timer 0 runs at 16/8=2MHz, Timer 1 at 16/64=0.25MHz. ==> 2/0.25=8. eISR_Rate = (timer >> 3) * step_loops / abs(e_steps[TOOL_E_INDEX]); //>> 3 is divide by 8. Reason: Timer 1 runs at 16/8=2MHz, Timer 0 at 16/64=0.25MHz. ==> 2/0.25=8.
#endif #endif
} }
else if (step_events_completed > (uint32_t)current_block->decelerate_after) { else if (step_events_completed > (uint32_t)current_block->decelerate_after) {
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment