Merge branch 'Alexays:master' into master

This commit is contained in:
Dordovel 2022-11-13 16:17:04 +03:00 committed by GitHub
commit 49afb87e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -495,7 +495,7 @@ const std::tuple<uint8_t, float, std::string, float> waybar::modules::Battery::g
float calculated_capacity{0.0f}; float calculated_capacity{0.0f};
if (total_capacity_exists) { if (total_capacity_exists) {
if (total_capacity > 0.0f) if (total_capacity > 0.0f)
calculated_capacity = (float)total_capacity; calculated_capacity = (float)total_capacity / batteries_.size();
else if (total_energy_full_exists && total_energy_exists) { else if (total_energy_full_exists && total_energy_exists) {
if (total_energy_full > 0.0f) if (total_energy_full > 0.0f)
calculated_capacity = ((float)total_energy * 100.0f / (float)total_energy_full); calculated_capacity = ((float)total_energy * 100.0f / (float)total_energy_full);