diff options
author | jkre <usokk@student.kit.edu> | 2024-01-22 22:20:33 +0100 |
---|---|---|
committer | jkre <usokk@student.kit.edu> | 2024-01-22 22:20:33 +0100 |
commit | 61105e46b77f81dfcfbc968f8f6eb9b89d4a541e (patch) | |
tree | f58ca990a85d221edccb60501edde7a882279a90 /src | |
parent | 40cdb92b8ea7d63a2475799106a628b79a9234b9 (diff) |
Add battery power draw to battery inforamtion tuple for openbsd and set it to a constant
Diffstat (limited to 'src')
-rw-r--r-- | src/openbsd/btop_collect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openbsd/btop_collect.cpp b/src/openbsd/btop_collect.cpp index df35662..c0f7b9f 100644 --- a/src/openbsd/btop_collect.cpp +++ b/src/openbsd/btop_collect.cpp @@ -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; @@ -417,7 +417,7 @@ namespace Cpu { } } - return {percent, seconds, status}; + return {percent, -1, seconds, status}; } auto collect(bool no_update) -> cpu_info & { |