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

AP_TempratureSensor: add support for analog sensor with polynomial #25152

Merged
merged 2 commits into from Oct 4, 2023

Conversation

IamPete1
Copy link
Member

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.

@rmackay9
Copy link
Contributor

rmackay9 commented Oct 3, 2023

It would be nice to get @magicrub's approval if he's tested.

@magicrub
Copy link
Contributor

magicrub commented Oct 3, 2023

@rmackay9 I don't have a sensor to test with.

Copy link
Contributor

@peterbarker peterbarker left a 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...

Copy link
Contributor

@magicrub magicrub left a 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.

@IamPete1
Copy link
Member Author

IamPete1 commented Oct 3, 2023

@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.

@tridge tridge merged commit e7ee287 into ArduPilot:master Oct 4, 2023
86 checks passed
@IamPete1 IamPete1 removed the DevCallEU label Oct 4, 2023
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.

None yet

6 participants