NGnius / PowerTools

Moved to
https://git.ngni.us/NG-SD-Plugins/PowerTools
GNU General Public License v3.0
413 stars 29 forks source link

Adjust Current to show discharging and charging rates #110

Closed Vinniehat closed 1 year ago

Vinniehat commented 1 year ago

Please confirm

Describe what you'd like to be able to do

Currently, the Current shows the rate at which the device is discharging or charging. But in my opinion, it does not denote this clearly, or account for the discharge rate when charging and subtracting that.

Describe alternatives you've considered

A possible way to fix this would be to denote whether the battery is discharging or charging by using "+" or "-" symbols. Another thing would be to account for battery consumption during charging and subtract that from the input current, to get the actual current of the battery. For example, if the charger is 2500mA, the device is using 500mA, then the current is 2000mA. In cases like this, maybe display it as "Current: 2000mA (-500mA)". If the number is negative, it is discharging, otherwise, it is charging.

Anything else?

No response

NGnius commented 1 year ago

This is a limitation of the sysfs API that PowerTools uses. The battery management system only reports a single current value which doesn't have a sign. I presume it's the absolute net current, but it's not like there's documentation I can check.

Closing since this isn't possible at the moment.