feat(battery): Also support energy_full (instead of charge_full)
This commit is contained in:
parent
5c4e368819
commit
57197b8e01
|
@ -374,6 +374,11 @@ waybar::modules::Battery::getInfos() {
|
||||||
if (mainBatHealthPercent == 0.0f || batHealthPercent < mainBatHealthPercent) {
|
if (mainBatHealthPercent == 0.0f || batHealthPercent < mainBatHealthPercent) {
|
||||||
mainBatHealthPercent = batHealthPercent;
|
mainBatHealthPercent = batHealthPercent;
|
||||||
}
|
}
|
||||||
|
} else if (energy_full_exists && energy_full_design_exists) {
|
||||||
|
float batHealthPercent = ((float)energy_full / energy_full_design) * 100;
|
||||||
|
if (mainBatHealthPercent == 0.0f || batHealthPercent < mainBatHealthPercent) {
|
||||||
|
mainBatHealthPercent = batHealthPercent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue