Show ramaining battery charge, not drianed

This commit is contained in:
eleksir
2024-09-27 20:57:58 +03:00
parent 1e5d85bb69
commit e485ca02d9

View File

@@ -48,7 +48,7 @@ func (c *MyConfig) UpdateBatteryInfo() {
// N.B. there can be case when battery is overcharged and shows >100%. It also can indicate that // N.B. there can be case when battery is overcharged and shows >100%. It also can indicate that
// calibration data is out of date and battery should be re-calibrated. // calibration data is out of date and battery should be re-calibrated.
ch = int(math.Round((b.Full - b.Current) * (100 / b.Full))) ch = int(math.Round((b.Full - (b.Full - b.Current)) * (100 / b.Full)))
switch { switch {
case ch > 85: case ch > 85: