Skip to content

Commit

Permalink
style: Change more var names to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
kiriDevs committed Apr 17, 2024
1 parent 3d54a60 commit 67bf98a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/modules/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,22 +357,21 @@ std::tuple<uint8_t, float, std::string, float, uint16_t, float> waybar::modules:
std::ifstream(bat / "energy_full_design") >> energy_full_design;
}

bool is_main_battery = charge_full_design >= largestDesignCapacity;
uint16_t cycle_count = 0;
uint16_t cycleCount = 0;
if (fs::exists(bat / "cycle_count")) {
std::ifstream(bat / "cycle_count") >> cycle_count;
std::ifstream(bat / "cycle_count") >> cycleCount;
}
if (is_main_battery) {
if (charge_full_design >= largestDesignCapacity) {
largestDesignCapacity = charge_full_design;

if (cycle_count > mainBatCycleCount) {
mainBatCycleCount = cycle_count;
if (cycleCount > mainBatCycleCount) {
mainBatCycleCount = cycleCount;
}

if (charge_full_exists && charge_full_design_exists) {
float bat_health_percent = ((float)charge_full / charge_full_design) * 100;
if (mainBatHealthPercent == 0.0f || bat_health_percent < mainBatHealthPercent) {
mainBatHealthPercent = bat_health_percent;
float batHealthPercent = ((float)charge_full / charge_full_design) * 100;
if (mainBatHealthPercent == 0.0f || batHealthPercent < mainBatHealthPercent) {

Check warning on line 373 in src/modules/battery.cpp

View workflow job for this annotation

GitHub Actions / build

src/modules/battery.cpp:373:39 [readability-uppercase-literal-suffix]

floating point literal has suffix 'f', which is not uppercase
mainBatHealthPercent = batHealthPercent;
}
}
}
Expand Down

0 comments on commit 67bf98a

Please sign in to comment.