removed changes

This commit is contained in:
sanjayk03-dev
2025-06-05 00:36:57 +05:30
parent eaf5c2a1e2
commit 747230cf9b
3 changed files with 4 additions and 49 deletions

View File

@@ -395,7 +395,6 @@ module.exports = new Vue({
update_object(this.state, e.data, false);
SvelteComponents.handleControllerStateUpdate(this.state);
console.log("Controller state updated:", this.state);
delete this.state.log;

View File

@@ -11,9 +11,7 @@
probeContacted,
probingComplete,
probingFailed,
probingStarted,
systemReady,
homeMachineComplete
probingStarted
} from "$lib/ControllerState";
import { numberWithUnit } from "$lib/RegexHelpers";
import TextFieldWithOptions from "$components/TextFieldWithOptions.svelte";
@@ -132,24 +130,6 @@
async function begin() {
try {
// Wait for both system ready and home machine completion
if (!get(systemReady) || !get(homeMachineComplete)) {
await new Promise(resolve => {
const unsubscribeSystem = systemReady.subscribe(ready => {
if (ready && get(homeMachineComplete)) {
unsubscribeSystem();
resolve(true);
}
});
const unsubscribeHome = homeMachineComplete.subscribe(homeComplete => {
if (homeComplete && get(systemReady)) {
unsubscribeHome();
resolve(true);
}
});
});
}
$probingActive = true;
assertValidProbeType();

View File

@@ -5,37 +5,13 @@ export const networkInfo = writable({});
export const probingActive = writable(false);
export const probeContacted = writable(false);
export const probingFailed = writable(false);
export const probingStarted = writable(false);
export const probingFailed = writable(false);
export const probingComplete = writable(false);
export const systemReady = writable(false);
export const homeMachineComplete = writable(false);
export function handleControllerStateUpdate(state: Record<string, any>) {
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)) {
if (state.cycle === "idle" && !get(probingStarted)) {
probeContacted.set(false);
probingFailed.set(false);
probingComplete.set(false);
}
if (state.cycle !== "idle" && state.pw === 0) {
if (get(probingActive)) {
if (state.pw === 0) {
probeContacted.set(true);
}