feat(training): Standard / Pro switch on the driver's page; purple day-best lap and stint consistency (1.87.0)
This commit is contained in:
1 parent
73e1c0ccf3
commit
0caf50254a
13 files changed
+204
-28
No files matched your search
@@ -678,6 +678,7 @@ function buildPublicTrainingStats(allLaps, layoutLaps = allLaps) {
|
||||
number: index + 1, startedAt, lapCount: stint.laps.length,
|
||||
bestLapMs: values.length ? Math.min(...values) : 0, averageLapMs: average(values),
|
||||
durationMs: Math.max(0, endedAt - startedAt),
|
||||
consistencyPct: values.length >= 3 ? Math.round(publicTrainingSpread(values) * 10) / 10 : null,
|
||||
// Lap times only (no timestamps) for the fold-out list on the driver's page.
|
||||
laps: stint.laps.slice(0, 300).map((lap) => ({ lapMs: lap.lapMs, excluded: Boolean(lap.excludedFromPace) })),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user