Skip to content

Commit

Permalink
Sometimes a small amount of battery power is being used when the batt…
Browse files Browse the repository at this point in the history
…ery is considered charged. If this happens, don’t show a remaining time estimate.
  • Loading branch information
mikepj committed Feb 7, 2020
1 parent 081e48b commit d968d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Graph Views/XRGBatteryView.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ - (void)graphUpdate:(NSTimer *)aTimer {
[self.dischargeWatts setNextValue:dischargeWattsSum];

// Calculate the time remaining.
if ((chargeWattsSum == 0) && (dischargeWattsSum == 0)) {
if ((fabs(chargeWattsSum) < 0.1) && (fabs(dischargeWattsSum) < 0.1)) {
minutesRemaining = 0;
}
else {
Expand Down

0 comments on commit d968d31

Please sign in to comment.