App 2.10.1: show negative usage while recuperating
Net regeneration over the window (or the trip) used to hide both estimates behind "needs a few minutes of driving". It is a real reading: the usage now shows as negative kWh/100 km, and the range as "> 999 km" with "while recuperating" beneath it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
@@ -110,6 +110,9 @@ public class RangeEstimatorTest {
|
||||
|
||||
RangeEstimator downhill = new RangeEstimator();
|
||||
for (long t = 0; t <= 240_000; t += 2_000) downhill.add(t, -5f, 80f);
|
||||
assertNull("net regeneration", downhill.average(25.4, 240_000));
|
||||
RangeEstimator.Estimate regen = downhill.average(25.4, 240_000);
|
||||
assertNotNull("net regeneration is a reading", regen);
|
||||
assertEquals(-6.25, regen.kwhPer100Km, 0.01);
|
||||
assertTrue(Double.isInfinite(regen.rangeKm));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user