api/ui: per-lap cone entry for skidpad runs #94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/skidpad-double-cones"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #3
A skidpad run is two laps (left + right circle), but the construct form collected a single run-level "Downed Cones" value which the API copied onto both lap rows. The run's cones therefore displayed twice in the lap table, and — worse — the cone time penalty was applied to both laps in scoring instead of only the lap where the cones were hit (avg of
(t1+2N, t2+2N)instead of(t1+2N, t2)).Fix: per-lap penalty entry
API (
api/)POST /lap/time_from_trigger_listaccepts optionaldowned_cones_counts/off_courses_countslists (index 0 =run_lap_index1), validated to have one entry per lap of the run (400 on mismatch)UI (
ui/src/components/LapTimes.jsx)Scoring (
libs/scoring/)total_conesalready sums both laps' counts — it is now correct with distinct per-lap values; regression test addedVerified
[2, 1]), legacy scalar behaviour pinned, mismatch → 4002+1 = 3, not the duplicated4make checkgreen; UI prettier/lint cleancones=2/cones=1; the UI bundle contains the new fieldsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.