Skip to content

Commit a8afd05

Browse files
committed
Battery (Haiku): fix capacity calculation
1 parent f4f1592 commit a8afd05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/battery/battery_haiku.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const char* parseBattery(int dfd, const char* battId, FFlist* results)
2828
battery->temperature = FF_BATTERY_TEMP_UNSET;
2929
battery->cycleCount = extended.cycles;
3030
battery->timeRemaining = -1;
31-
battery->capacity = (double) basic.capacity / (double) extended.last_full_charge;
31+
battery->capacity = (double) basic.capacity * 100. / (double) extended.last_full_charge;
3232

3333
if (basic.state & BATTERY_DISCHARGING)
3434
ffStrbufAppendS(&battery->status, "Discharging, ");

0 commit comments

Comments
 (0)