Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
LSC_fill/empty fix (#90)
Browse files Browse the repository at this point in the history
Fix to account for the difference in seconds and ticks to be more accurate.
  • Loading branch information
Reflex18 authored May 11, 2024
1 parent d2df5d9 commit 59d4c95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -927,14 +927,14 @@ public String[] getInfoData() {
if (avgIn > avgOut) {
// Calculate time to full if charging
if (avgIn != 0) {
double timeToFull = (capacity.longValue() - stored.longValue()) / avgIn;
double timeToFull = (capacity.longValue() - stored.longValue()) / avgIn / 20;
String timeToFullString = formatTime(timeToFull);
ll.add("Time to Full: " + timeToFullString);
}
} else {
// Calculate time to empty if discharging
if (avgOut != 0) {
double timeToEmpty = stored.longValue() / avgOut;
double timeToEmpty = stored.longValue() / avgOut / 20;
String timeToEmptyString = formatTime(timeToEmpty);
ll.add("Time to Empty: " + timeToEmptyString);
}
Expand Down

0 comments on commit 59d4c95

Please sign in to comment.