VR-25 / acc

Advanced Charging Controller
https://github.com/Magisk-Modules-Repo/acc
GNU General Public License v3.0
1.72k stars 108 forks source link

Deapply applyOnPlug on force charge #210

Closed ElDavoo closed 1 year ago

ElDavoo commented 1 year ago

My config: acc.txt

In particular, I've set applyOnPlug=(battery/night_charging::1) to further slow down the charge of the device.

However, when using the "force charging until >= X% feature", the switch is not reverted to the default (while the others, like the maxChargingCurrent switches, are reset).

This makes the forced charging much slower. I'd like to use this feature for when I need to go outside in an unplanned way (so I don't know how much time I will be out and how much charge I will need.), but right now I just disable ACC from the manager and reboot the phone, so I can get those 10/20 minutes of fast charge. :)

I guess this make sense, as "applyOnPlug" means that switch is applied on plug and that's it, the state is not further tracked.

Does ACC have a way to reset this switch when force enabling charging?
Maybe this could be an optional parameter of the applyOnPlug option?
Thanks

VR-25 commented 1 year ago

Solution: applyOnPlug=(battery/night_charging::1::0)

Explanation: applyOnPlug=(ctrl_file::value::default_value)