From 879b36dd0d93e85208c64ce79bc3ead7f63f53cd Mon Sep 17 00:00:00 2001 From: bsaravanan783 Date: Tue, 3 Jun 2025 22:37:31 +0530 Subject: [PATCH] fix --- src/svelte-components/src/lib/ControllerState.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/svelte-components/src/lib/ControllerState.ts b/src/svelte-components/src/lib/ControllerState.ts index 462f1cc..2bb1783 100644 --- a/src/svelte-components/src/lib/ControllerState.ts +++ b/src/svelte-components/src/lib/ControllerState.ts @@ -14,10 +14,18 @@ export const homeMachineComplete = writable(false); export function handleControllerStateUpdate(state: Record) { if (!get(systemReady)) { systemReady.set(true); + probeContacted.set(false); + probingFailed.set(false); + probingStarted.set(false); + probingComplete.set(false); } if (state.xx === "READY" && !get(homeMachineComplete)) { homeMachineComplete.set(true); + probeContacted.set(false); + probingFailed.set(false); + probingStarted.set(false); + probingComplete.set(false); } if (get(probingActive) && get(systemReady) && get(homeMachineComplete)) { @@ -27,7 +35,7 @@ export function handleControllerStateUpdate(state: Record) { probingComplete.set(false); } - if (state.pw === 0) { + if (state.cycle !== "idle" && state.pw === 0) { probeContacted.set(true); }