Use native LinuxCNC homing and consolidate web panel status

This commit is contained in:
2026-09-09 12:28:02 +08:00
parent eb5c58cdb3
commit 0be2ee8ce1
35 changed files with 881 additions and 350 deletions

View File

@@ -108,17 +108,6 @@ export class WasmHomeLimit {
return this.read();
}
// Resolve the canonical target of a home command without committing the
// homed mask or pose. The actual commit is performed only after the LinuxCNC
// TP has executed the queued move to this target.
previewHome(axis = null) {
const saved = this.exportState();
const target = this.home(0, axis);
try { this.restoreState(saved); } catch (error) { return { status: "error", code: String(error?.message ?? error) }; }
if (target.status !== "verified") return target;
return { status: "verified", state: target.state };
}
check(joints) {
if (!this.available) return this.read();
if (!Array.isArray(joints) || joints.length < this.jointCount || joints.some((value) => typeof value !== "number" || !Number.isFinite(value))) return { status: "error", code: "wasm_home_joints_invalid" };