Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix writing to servos #13

Closed
wants to merge 1 commit into from
Closed

Conversation

kevin-brown
Copy link

This fixes an issue with the equation used to calculate the pulse width, where the full number of degrees was being used instead of a percentage.

This fixes an issue where the pulse width for a servo would be too
large an cause it to stall out.  This was because the pulse width
was not being caused by a percentage of the total number of degrees,
but instead using the total number of degrees.

The number of degrees as 180 has been determined based on testing
where it was discovered that 180 degrees is typically the maximum
angle for a servo.

Originally noted in hybridgroup@122ff58#commitcomment-10680946.

Signed-off-by: Kevin Brown <kevin@kevinbrown.in>
@kevin-brown
Copy link
Author

Closing this off as this is actually handled by cylon-gpio correctly, we just didn't understand what value was supposed to be.

Side note: There don't appear to be any tests for servos, and this PR was green at one point.

@kevin-brown kevin-brown deleted the patch-1 branch April 19, 2015 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant