From 32448cb2a803018fb582228bc2be820f0626a700 Mon Sep 17 00:00:00 2001 From: Jannik Date: Sat, 13 Sep 2025 20:44:57 +0200 Subject: [PATCH] feat: announce going off route --- src/lib/services/navigation/routing.svelte.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/services/navigation/routing.svelte.ts b/src/lib/services/navigation/routing.svelte.ts index 0158d51..c7b6ef7 100644 --- a/src/lib/services/navigation/routing.svelte.ts +++ b/src/lib/services/navigation/routing.svelte.ts @@ -179,10 +179,16 @@ async function tickRoute() { // Check if the user is on the route if (!isOnShape(loc, polyline)) { console.log("Off route!"); + if (!info.isOffRoute) { + say("You went off route."); + } info.isOffRoute = true; // TODO: Implement re-routing logic return; } else { + if (info.isOffRoute) { + say("You are back on route."); + } info.isOffRoute = false; }