Skip to content

CalibratedSensor: settle time as parameter #56

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
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Schnilz
Copy link

@Schnilz Schnilz commented May 15, 2025

Hi,
I had some problems with the CalibratedSensor class when using with the new HybridStepper functionality.
Solution was to increase the settle time but as it was hard coded i made it a parameter.
Also my Encoder (which is a standard Mag enocoder with quadrature A/B interface) did output negative values with the getMechanicalAngle-API which made the LUT not work when turning negative. I added a fmodf call to prevent that.

@runger1101001
Copy link
Member

Thank you very much for contributing this.

You're completely right that the Encoder class does not obey the contract of the Sensor superclass - that's not really implemented correctly one could say. As a consequence the CalibratedSensor had the bug you found - I believe it was developed using a magnetic sensor which would not have manifested this problem. Thanks a lot for catching it.

@runger1101001 runger1101001 added this to the 1.0.9 milestone May 16, 2025
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.

2 participants