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

[Diagnostics] Batterry charge datasource #1395



Copy link

commented Sep 26, 2017

submission notes
**Important:** Please sanitize/remove any confidential info like usernames, passwords, org names, product names/ids, access tokens, client ids/secrets, or anything else you don't wish to share.

Please Read and Sign the Contributor License Agreement ([Info here](

You may also delete this submission notes header if you'd like. Thank you for contributing!


Implements battery state of charge diagnostic datasource (DIAG_ID_SYSTEM_BATTERY_CHARGE).

Steps to Test


Example App





  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to after merging (add links to docs and issues)
avtolstoy added 11 commits Aug 15, 2017
const variables declared in header files will have external linkage w…
…hen built by C (as opposed to C++) compiler. Replace const variables like OS_THREAD_INVALID_HANDLE in concurrent_hal.h with defines when being built by C compiler
Battery charge diagnostics
- Moves system_power_management functions into separate CU system_power.cpp
- Moves system_power_management_update() call to system thread
- Adds thread-safety to
Copy link

left a comment

I would like a 2nd pair of eyes on this - I gave the code the once over and it looks good. Can you say a few words about where the concurrency comes from and why the I2C lock is needed?

@m-mcgowan m-mcgowan requested a review from technobly Oct 3, 2017

@avtolstoy avtolstoy referenced this pull request Oct 23, 2017
3 of 6 tasks complete
Copy link

left a comment

My comments from #1412 apply here (or there) as well :)

@m-mcgowan m-mcgowan added this to the 0.8.0 milestone Nov 14, 2017


This comment has been minimized.

Copy link

commented Nov 14, 2017

this has been merged into develop.

@m-mcgowan m-mcgowan closed this Nov 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.