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

sensor: ms5837: fix compensate parameters for 30BA variant #69069

Merged
merged 1 commit into from
May 29, 2024

Conversation

EthanAussie
Copy link
Contributor

The previous parameters seems wrong if we refer to:
https://www.te.com/usa-en/product-CAT-BLPS0017.html

compensation from data sheet

@zephyrbot zephyrbot added the area: Sensors Sensors label Feb 16, 2024
Copy link

Hello @EthanAussie, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

kartben
kartben previously approved these changes Feb 28, 2024
@kartben
Copy link
Collaborator

kartben commented Feb 28, 2024

please amend your commit so that your author first/last name matches the signed-off by entry. Thanks for the PR!

@EthanAussie
Copy link
Contributor Author

EthanAussie commented Feb 28, 2024 via email

@EthanAussie
Copy link
Contributor Author

Not sure what is the status of this pull request.
I just rebased to the latest Zephyr.
Hope this helps.

kartben
kartben previously approved these changes May 24, 2024
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EthanAussie sorry that this felt through the cracks -- lgtm

@teburd @MaureenHelm @ubieda maybe you can help review too - thx!

@kartben kartben requested a review from ubieda May 24, 2024 07:53
Copy link
Member

@ubieda ubieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!
AFAIK - Just a small change-req, otherwise looks good!

Ti = (3ll * dT * dT) / (1ll << 23);
OFFi = (3ll * temp_sq) / 1ll;
Ti = (3ll * dT * dT) / (1ll << 33);
OFFi = (3ll * temp_sq) / 1ll << 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add parenthesis here, otherwise division will take precedence to the left-shift operation.

Suggested change
OFFi = (3ll * temp_sq) / 1ll << 1;
OFFi = (3ll * temp_sq) / (1ll << 1);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time to do the pull request and change, etc.
I changed the original branch according to ubieda's suggestion.
It is great catch. Thanks.

@henrikbrixandersen henrikbrixandersen merged commit 9baf77d into zephyrproject-rtos:main May 29, 2024
21 checks passed
Copy link

Hi @EthanAussie!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

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

Successfully merging this pull request may close these issues.

6 participants