feat(race-day): start heats with an EFRA/IFMAR count-down and flying start
Race Day Start now runs a count-down (Go, 30 s - 5 min, default per event) with calls every minute, 30 s and 10 s, grid call and 9..3 count for grid starts, hold/resume/+1 min/to 30 s/to 10 s/Go now, and starts the heat by itself when it runs out. The transponder check runs during the count-down, replacing the separate warm-up. Adds a flying start mode (horn + clock is running, own clock per car) as the qualifying default, and the latest personal clock start rules from EFRA 9.3 / IFMAR 4.2.3 for flying and staggered starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1bc75f8ec1
commit
5bfb67ea02
27 files changed
+884
-334
No files matched your search
+11
-1
@@ -1,5 +1,6 @@
|
||||
import { decoderDiagnostics } from "./decoder_diagnostics.js";
|
||||
import { getControlledLapStreak } from "./training_logic.js";
|
||||
import { usesPersonalClock, getLatestClockStartTs } from "./prologue_logic.js";
|
||||
|
||||
const PRACTICE_SESSION_TYPES = new Set(["open_practice", "free_practice", "practice"]);
|
||||
|
||||
@@ -436,7 +437,16 @@ export function processDecoderMessageHelper(msg, deps, decoderRole = "main") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (startMode === "staggered" && !entry.startTimestamp) {
|
||||
if (usesPersonalClock(startMode) && !entry.startTimestamp) {
|
||||
// A late car's clock started without it (EFRA 9.3 / IFMAR 4.2.3): its first crossing
|
||||
// after that moment is already a counted lap, measured from the latest clock start.
|
||||
const latestStartTs = getLatestClockStartTs({ ...session, startMode }, result);
|
||||
if (latestStartTs && timestamp > latestStartTs) {
|
||||
entry.startTimestamp = latestStartTs;
|
||||
entry.lastTimestamp = latestStartTs;
|
||||
}
|
||||
}
|
||||
if (usesPersonalClock(startMode) && !entry.startTimestamp) {
|
||||
entry.startTimestamp = timestamp;
|
||||
entry.lastTimestamp = timestamp;
|
||||
announcePassing(entry);
|
||||
|
||||
Reference in new issue
Block a user