Skip to content

Commit

Permalink
Add battery power draw to battery inforamtion tuple for openbsd and s…
Browse files Browse the repository at this point in the history
…et it to a constant
  • Loading branch information
vsey committed Jan 22, 2024
1 parent 40cdb92 commit 61105e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openbsd/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ namespace Cpu {
return core_map;
}

auto get_battery() -> tuple<int, long, string> {
if (not has_battery) return {0, 0, ""};
auto get_battery() -> tuple<int, float, long, string> {
if (not has_battery) return {0, 0, 0, ""};

long seconds = -1;
uint32_t percent = -1;
Expand Down Expand Up @@ -417,7 +417,7 @@ namespace Cpu {
}
}

return {percent, seconds, status};
return {percent, -1, seconds, status};
}

auto collect(bool no_update) -> cpu_info & {
Expand Down

0 comments on commit 61105e4

Please sign in to comment.