mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Battery (Haiku): fix capacity calculation
This commit is contained in:
@@ -28,7 +28,7 @@ const char* parseBattery(int dfd, const char* battId, FFlist* results)
|
||||
battery->temperature = FF_BATTERY_TEMP_UNSET;
|
||||
battery->cycleCount = extended.cycles;
|
||||
battery->timeRemaining = -1;
|
||||
battery->capacity = (double) basic.capacity / (double) extended.last_full_charge;
|
||||
battery->capacity = (double) basic.capacity * 100. / (double) extended.last_full_charge;
|
||||
|
||||
if (basic.state & BATTERY_DISCHARGING)
|
||||
ffStrbufAppendS(&battery->status, "Discharging, ");
|
||||
|
||||
Reference in New Issue
Block a user