Skip to content

Quadrature encoder trait #51

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

Open
austinglaser opened this issue Mar 1, 2018 · 0 comments
Open

Quadrature encoder trait #51

austinglaser opened this issue Mar 1, 2018 · 0 comments

Comments

@austinglaser
Copy link
Contributor

Signed count

It's unclear from the documentation whether the intended use is an unsigned result from count(), with direction() indicating which way the system has moved from its zero point, or whether count() may return a signed value and direction() indicates the sign of the last change in location.

From an ergonomic standpoint, I strongly prefer the use of a signed count() -- perhaps enforced on the Count type? The hidden lines in the example seem to suggest an unsigned value being the intended use, however.

This would probably be clarified by a reference implementation.

Count reset

Should the Qei trait have a reset_count(&mut self) method?

Users of a quadrature encoder might want the ability to make the current position "zero". Some hardware implementations will support this by default, or it can be done in software by subtracting an offset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants