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

Allow ANY capacity value, while still ensuring RESUME is always lower than PAUSE #177

Open
VR-25 opened this issue Aug 11, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@VR-25
Copy link
Collaborator

VR-25 commented Aug 11, 2021

I implemented a new acc feature that lets one use millivolts as opposed to capacity/level thresholds.
The new algorithm kicks in only when the given value is >= 3000 (mV).

This is useful especially for devices that don't provide reliable capacity measurements (I've got one).
It's also another alternative to voltage limit - which works only on very few/special devices.

One can have some capacity thresholds be in millivolts and others in %, simultaneously.
This means, acc 4200 20 works just as well as acc 80 75.
By the way, all capacity thresholds, including shutdown_capacity can be in millivolts.

@VR-25 VR-25 added the enhancement New feature or request label Aug 11, 2021
@nialone
Copy link
Contributor

nialone commented Aug 11, 2021

In what version are these new ACC functions?
This is necessary to switch graphic interface.
How to send a new command in the terminal? You recorded in the FAQ? ))

@VR-25
Copy link
Collaborator Author

VR-25 commented Aug 11, 2021

In what version are these new ACC functions?

v2021.7.28 (202107280) and newer

This is necessary to switch graphic interface.
How to send a new command in the terminal? You recorded in the FAQ? ))

All the information is in README.md.
Read NOTES/TIPS FOR FRONT-END DEVELOPERS, Terminal Commands and DEFAULT CONFIGURATION.

@VR-25 VR-25 pinned this issue Aug 31, 2021
@CrazyBoyFeng
Copy link
Contributor

If resume is set to 80 and pause is set to 3200, it is invalid, right? So we need to make them in the same units, right?

The two-unit format is a bit complicated, both for our program and for the user. Can this solution be optimized any further?
Does the conversion formula capacity=(voltage-3000)/(4200-3000) apply to all devices? If so, we can use voltage internally and then show capacity to the user.
If it doesn't apply to all devices, then we should probably make a database. Automatic internal conversion for such few devices, and show capacity to the user.

@VR-25
Copy link
Collaborator Author

VR-25 commented Sep 5, 2021

If resume is set to 80 and pause is set to 3200, it is invalid, right? So we need to make them in the same units, right?

No.
It works.

Quoting myself...
One can have some capacity thresholds be in millivolts and others in %, simultaneously.
This means, acc 4200 20 works just as well as acc 80 75.
By the way, all capacity thresholds, including shutdown_capacity can be in millivolts.

The two-unit format is a bit complicated, both for our program and for the user. Can this solution be optimized any further?
Does the conversion formula capacity=(voltage-3000)/(4200-3000) apply to all devices? If so, we can use voltage internally and then show capacity to the user.
If it doesn't apply to all devices, then we should probably make a database. Automatic internal conversion for such few devices, and show capacity to the user.

The logic applied depends on the value given.
Any capacity value above 3000 is considered millivolt as opposed to %.
Conversions are not the goal and are not reliable to begin with.
Voltage varies with temperature and battery age - meaning, there's no linear relationship between battery level and voltage.

Here's a practical example:
One of my devices has a broken charging driver/hardware.
It does not report the correct capacity (%).
To better control charging, acc uses voltage instead of % thresholds.

@CrazyBoyFeng
Copy link
Contributor

When resume is set to 80 and pause is set to 3200, the pause voltage converted to capacity is 17. I say it's invalid to emphasize that it doesn't meet the resume<pause.
In this example, to ensure that resume<pause, we need either convert or keep the units same.

@VR-25
Copy link
Collaborator Author

VR-25 commented Sep 5, 2021

I totally missed your point.
My bad!
Indeed that's an issue.
However, I would assume that somebody who intends to use % and voltage simultaneously would be knowledgeable enough to realize that 3200 is too low.

@CrazyBoyFeng
Copy link
Contributor

CrazyBoyFeng commented Sep 5, 2021 via email

@VR-25
Copy link
Collaborator Author

VR-25 commented Sep 5, 2021

An advanced user mode is a great idea.
Any values out of the [-1-101]% range should fire a warning notification.

@nialone
Copy link
Contributor

nialone commented Sep 6, 2021

Personally, I do not understand the battery and must confuse the value. It is best to limit 2 modes: only percent OR millivolts. Ideas? Where are you going to use your advanced mode? It is not comfortable.

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

No branches or pull requests

3 participants