Skip to content

Commit

Permalink
Merge pull request #477 from blurfl/Issue#476-G2-gcode-error
Browse files Browse the repository at this point in the history
Correct angle calculation
  • Loading branch information
MaslowCommunityGardenRobot authored Nov 7, 2018
2 parents e67c185 + 82b6ce4 commit d0943e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cnc_ctrl_v1/Motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ int arc(const float& X1, const float& Y1, const float& Z1, const float& X2, co

degreeComplete = float(numberOfStepsTaken)/float(finalNumberOfSteps);

angleNow = startingAngle + theta*direction*degreeComplete;
angleNow = startingAngle + theta*degreeComplete;

sys.xPosition = radius * cos(angleNow) + centerX;
sys.yPosition = radius * sin(angleNow) + centerY;
Expand Down

0 comments on commit d0943e2

Please sign in to comment.