-
Notifications
You must be signed in to change notification settings - Fork 907
Add example for MPL3115A2 altimeter #136
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
Add example for MPL3115A2 altimeter #136
Conversation
Where are we on this, are we ready to pass it to @kilograham for a final review? @lurch opinions? |
hsum += data.altitude; | ||
} | ||
printf("%d sample average -> t: %.4f C, h: %.4f m\n", MPL3115A2_FIFO_SIZE, tsum / MPL3115A2_FIFO_SIZE, hsum / MPL3115A2_FIFO_SIZE); | ||
has_new_data = false; |
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.
There's no mutex protection on the has_new_data variable and it is set in the interrupt routine and tested here. However, its likely OK in this simple case.
I had one comment about a variable accessed in interrupt and main thread domain, but @kilograham may be OK with it. Otherwise LGTM. |
This PR adds an example for the MPL3115A2 altimeter with absolute pressure + temp sensor. To add some variety to the sea of pressure/temp sensors, this example demonstrates some of the more advanced features of this board and its different modes.
Checklist