Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshito-okada committed Nov 12, 2021
1 parent 8ec052f commit 5d5180f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1277,9 +1277,9 @@ int32_t DynamixelWorkbench::convertVelocity2Value(uint8_t id, float velocity)
if (strcmp(getModelName(id), "XL-320") == 0)
{
if (velocity == 0.0f) value = 0;
// CW rotation to [0, 1023]
// CCW rotation to [0, 1023]
else if (velocity < 0.0f) value = (-velocity / (model_info->rpm * RPM2RADPERSEC));
// CCW rotation to [1024, 2047]
// CW rotation to [1024, 2047]
else if (velocity > 0.0f) value = (velocity / (model_info->rpm * RPM2RADPERSEC)) + 1024;

return value;
Expand Down

0 comments on commit 5d5180f

Please sign in to comment.