Skip to content

Fix voltage calculation - Update mkr-battery-app-note.md #1501

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fl43
Copy link

@fl43 fl43 commented Nov 16, 2023

I was wondering why the calculated voltages in the example have not been correct. So I analysed it and found a wrong data type (max_Source_voltage).

What This PR Changes

  • Fix data type of variable max_Source_voltage. Float is correct here to get correct values.
  • Made calculation of the two voltages (voltADC and voltBat) better. No real change, but more accurate results this way. The order of the operations matter when you want to get accurate results.

Contribution Guidelines

Fix data type of variable max_Source_voltage. Float is correct here to get correct values.
Made calculation of the two voltages better. No real change, but more accurate results this way.
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2023

CLA assistant check
All committers have signed the CLA.

@fl43 fl43 marked this pull request as draft November 16, 2023 13:41
Added previous fix in all places.
@fl43 fl43 marked this pull request as ready for review November 16, 2023 13:59
@jhansson-ard jhansson-ard added fix/update A small fix or update community Bugs and fixes suggested by the community maker labels Nov 20, 2023
@karlsoderby karlsoderby requested a review from aliphys November 21, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Bugs and fixes suggested by the community fix/update A small fix or update maker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants