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

Consolidate encoder modules #13

Merged
merged 11 commits into from
Jan 31, 2025
Merged

Consolidate encoder modules #13

merged 11 commits into from
Jan 31, 2025

Conversation

alexeden
Copy link
Owner

Removes the QuadEncoderModule, which was added to support Adafruit's quad rotary encoder device, in favor of updating (with breaking API changes) the existing EncoderModule to support both single and multiple encoder devices. This is more in line with the underlying seesaw firmware and Adafruit's C++ and Python driver libraries.

The module's methods now require that you specify which encoder you're referring to. In the case of a single encoder device, the value is always 0.

e.g.

// previously
let position = encoder.position().expect("Failed to get position");
// now
let position = encoder.position(0).expect("Failed to get position");

@alexeden alexeden merged commit c2b4664 into main Jan 31, 2025
1 check passed
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.

1 participant