Add battery power draw to battery inforamtion tuple for openbsd and set it to a constant

This commit is contained in:
jkre 2024-01-22 22:20:33 +01:00
parent 40cdb92b8e
commit 61105e46b7
1 changed files with 3 additions and 3 deletions

View File

@ -385,8 +385,8 @@ namespace Cpu {
return core_map; return core_map;
} }
auto get_battery() -> tuple<int, long, string> { auto get_battery() -> tuple<int, float, long, string> {
if (not has_battery) return {0, 0, ""}; if (not has_battery) return {0, 0, 0, ""};
long seconds = -1; long seconds = -1;
uint32_t percent = -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 & { auto collect(bool no_update) -> cpu_info & {