fix: use minimum of 30km/h when actual speed is slower
This bug caused very late verbal instructions when being slow (like in traffic)
This commit is contained in:
@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user