fix: use minimum of 30km/h when actual speed is slower
All checks were successful
TrafficCue CI / check (push) Successful in 54s
TrafficCue CI / build (push) Successful in 50s

This bug caused very late verbal instructions when being slow (like in traffic)
This commit is contained in:
Cfp
2025-07-12 10:57:42 +02:00
parent 4b520be5f9
commit c1afd69a7b

View File

@ -260,7 +260,7 @@ async function tickRoute() {
} }
function verbalPreInstructionDistance(speed: number): number { function verbalPreInstructionDistance(speed: number): number {
return speed * 2.222 + 37.144; return Math.min(speed, 30) * 2.222 + 37.144;
} }
export function stopNavigation() { export function stopNavigation() {