App 2.17.0: speed average, compact top bar, About in Settings
- "Speed, 5-min average" card under Speed: time-weighted mean speed, standing included, from the same samples as the other averages. - The top bar is one compact line (title and subtitle side by side). Version, update check and About moved from it to an App card on the Settings tab. - The Overview no longer scrolls in the car's window: checked on the emulator at 1778x640, the layout height the car reports, after trimming the page's padding and the tyre card's height. - The capacity hint says "Overview" instead of "Vehicle tab". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
@@ -140,4 +140,16 @@ public class RangeEstimatorTest {
|
||||
for (long t = 315_000; t <= 450_000; t += 15_000) r.add(t, 2f, 0f);
|
||||
assertEquals(11.0, r.averagePowerKw(450_000), 1.0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void averageSpeedOverTheLastFiveMinutes() {
|
||||
RangeEstimator r = new RangeEstimator();
|
||||
r.add(0, 10f, 60f);
|
||||
assertNull(r.averageSpeedKmh(0));
|
||||
for (long t = 15_000; t <= 300_000; t += 15_000) r.add(t, 10f, 60f);
|
||||
assertEquals(60.0, r.averageSpeedKmh(300_000), 1e-6);
|
||||
// Half the window standing at lights halves the average.
|
||||
for (long t = 315_000; t <= 450_000; t += 15_000) r.add(t, 1f, 0f);
|
||||
assertEquals(30.0, r.averageSpeedKmh(450_000), 4.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user