-
Notifications
You must be signed in to change notification settings - Fork 18k
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
AP_TempratureSensor: add support for analog sensor with polynomial #25152
Conversation
It would be nice to get @magicrub's approval if he's tested. |
@rmackay9 I don't have a sensor to test with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... my original review should have been request-changes...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.. although I'm not in favor of the name, it feels misleading. It's not just "analog", it's specific to a type of signal that is output by a specific sensor. It's not just a plain old analog voltage like we've used in rangefinder and battery stuff in the past.
@magicrub I'm open to better suggestions. The analog range finder has a offset and a scale factor, that is the first two params of our polynomial. It also has a param for a fit type, "LINEAR", "INVERTED" and "HYPERBOLA". I don't think this is so different to that. |
This work is sponsored by Spektreworks.
This adds support for a analog voltage temperature sensor. It uses a 4th order polynomial to go from voltage to temperature for use with thermistors. Because of the 5 polynomial terms and the pin this adds a var pointer param table to AP_TempratureSensor like those in battery and rangefinder.