Skip to content

Doc: clarify that Servo::read() does not read the servo angle #136

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

Merged
merged 2 commits into from
Apr 19, 2025

Conversation

edgar-bonet
Copy link
Contributor

The documentation of Servo::read() states:

Read the current angle of the servo [...]

This is misleading: the servo has no way of reporting its current angle. Although the sentence in parentheses attempts to clarify that this is “the value passed to the last call to write()”, this clarification is not prominent enough. I have witnessed students use Servo::read() as a way to check that the requested position has been reached.

This pull request makes absolutely clear that Servo::read() reads the servo setpoint, and that there is no way to read its current angular position.

“The current angle of the servo” could be misunderstood as its physical
orientation.
@per1234 per1234 added type: enhancement Proposed improvement topic: documentation Related to documentation for the project labels Apr 19, 2025
@per1234 per1234 self-assigned this Apr 19, 2025
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @edgar-bonet!

@per1234 per1234 merged commit aeef55f into arduino-libraries:master Apr 19, 2025
3 checks passed
@edgar-bonet edgar-bonet deleted the doc-read branch April 19, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants