Skip to content

Commit

Permalink
Merge pull request #479 from madgrizzle/patch-2
Browse files Browse the repository at this point in the history
Change operation associated with ChainTolerance
  • Loading branch information
MaslowCommunityGardenRobot authored Jan 23, 2019
2 parents 4941486 + 3c9402c commit e1e0d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cnc_ctrl_v1/Kinematics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ void Kinematics::triangularInverse(float xTarget,float yTarget, float* aChainLe
Chain2Straight *= (1 + ((sysSettings.chainSagCorrection / 1000000000000) * pow(cos(Chain2Angle),2) * pow(Chain2Straight,2) * pow((tan(Chain1Angle) * cos(Chain2Angle)) + sin(Chain2Angle),2)));

//Calculate total chain lengths accounting for sprocket geometry and chain sag
float Chain1 = Chain1AroundSprocket + Chain1Straight * (1.0f + sysSettings.leftChainTolerance / 100.0f);
float Chain2 = Chain2AroundSprocket + Chain2Straight * (1.0f + sysSettings.rightChainTolerance / 100.0f);
float Chain1 = Chain1AroundSprocket + Chain1Straight / (1.0f + sysSettings.leftChainTolerance / 100.0f);
float Chain2 = Chain2AroundSprocket + Chain2Straight / (1.0f + sysSettings.rightChainTolerance / 100.0f);

//Subtract of the virtual length which is added to the chain by the rotation mechanism
Chain1 = Chain1 - sysSettings.rotationDiskRadius;
Expand Down

0 comments on commit e1e0d02

Please sign in to comment.