Created
November 28, 2014 22:05
-
-
Save arthurwolf/b02d5709c2d3d547cb4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stepper interrupt | |
do the steps we decided to do from last interrupt ( we don't execute steps immediately but at the beginning of next interrupt, grbl does this too ) | |
for each axis | |
store the new position for this axis based on the step just taken ( or not taken ) | |
find the current block | |
for each axis in this block | |
find the move corresponding to that axis in that block | |
vel0 = velocity for this move ( this is pre-computed, and changes per-step ) | |
acc = acceleration for this move ( this is pre-computed ) | |
position for this axis += velocity + acceleration | |
this move's velocity = vel0 + acc ( this is per-step acceleration, note acc is pre-computed ) | |
decide if we do a step for this axis, based on new position and bresenham | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment