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

Show battery percentage while charging #687

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

Conversation

DarkendHall
Copy link

@DarkendHall DarkendHall commented Jan 24, 2024

Shows you the battery percentage whilst the battery is charging and not at full capacity (or whatever batteryStatus === 2 is, please correct me if I am wrong).

Fixes #686

Proposed change:
image

@alexpargon
Copy link
Contributor

alexpargon commented Jan 25, 2024

Hey there @DarkendHall !

You are correct! that's the right way to read the battery level, but we disabled it because, during charge, the method we use to read the battery voltage is not to be trusted (as it's receiving an external power source).

so the measurements you will get are not accurate, if you want to try experimenting with those values and seem trustworthy enough for you, please get us back here! so we can open a poll with other users and know what they think about it.

@DarkendHall
Copy link
Author

Hey there @DarkendHall !

You are correct! that's the right way to read the battery level, but we disabled it because, during charge, the method we use to read the battery voltage is not to be trusted (as it's receiving an external power source).

so the measurements you will get are not accurate, if you want to try experimenting with those values and seem trustworthy enough for you, please get us back here! so we can open a poll with other users and know what they think about it.

It seemed to display accurate numbers for me during the time it took me to implement the change, although I had to keep wireless mode on. When I turned off the wireless mode it showed up as 1%, but it was showing 70% turned on (both while charging and on battery power).

@alexpargon
Copy link
Contributor

Yes, the thing is that the battery value you get comes from a moving average, so there are still valid values to make the operation for the new %.

the readings that we do are valid between ~10% and ~70% for charging mode, for higher values the charging curves switch between fixed intensity to fixed voltage, and with fixed voltage, we do not know what's happening right now 🤣.

image

@alexpargon
Copy link
Contributor

The new Raise 2 and batch 3 of the Defy will incorporate a specific chip to monitor charge and battery life, so if the hardware supports it, we will give you much more information about battery life and health.

The new chip is MAX17260 and will enable precise battery monitoring and better reporting.

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.

Show battery percentage whilst charging
2 participants