My Pinebook Pro battery does not have energy_now or charge_now available in /sys - it only has capacity which is a percentage. Current cbatticon therefore can't detect my battery charge.
This patch checks for capacity of energy_now/charge_now fail, then uses that to recalculate the actual charge based on the full charge (which is available on my machine).
There may be a much prettier way to do this, but it's a start and it works.
My Pinebook Pro battery does not have
energy_now
orcharge_now
available in /sys - it only hascapacity
which is a percentage. Current cbatticon therefore can't detect my battery charge.This patch checks for
capacity
ofenergy_now
/charge_now
fail, then uses that to recalculate the actual charge based on the full charge (which is available on my machine).There may be a much prettier way to do this, but it's a start and it works.