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

@@ -24,7 +24,7 @@ const snapshot = () => session.xyzacProgram.snapshot();
const sample = (cycles = 5) => send("SIM_STEP", { cycles, response: "motion_delta" });
send("HELLO"); send("SESSION_ATTACH"); send("LOAD_WORKSPACE", { root_path: "/workspace", configuration: toWorkerConfiguration(bundle) });
send("PROGRAM_LOAD", { path: "pause-reading.ngc", source: "G21 G90\n" + Array.from({ length: 80 }, (_, i) => `G1 X${i % 2 ? 0 : 2} F600`).join("\n") + "\nM2\n" });
send("POWER", { active: true }); send("HOME", { all: true }); send("PROGRAM_RUN"); sample();
send("POWER", { active: true }); send("HOME", { all: true }); sample(1); send("PROGRAM_RUN"); sample();
for (let round = 0; round < 3; round++) {
send("PROGRAM_PAUSE");
const pose = motion().position, line = snapshot().current_line, queue = motion().queue_depth;