Use native LinuxCNC homing and consolidate web panel status
This commit is contained in:
@@ -9,7 +9,7 @@ if (!modulePath) {
|
||||
|
||||
const imported = await import(pathToFileURL(modulePath).href);
|
||||
const playwright = imported.default ?? imported;
|
||||
const browser = await playwright.chromium.launch({ headless: true, executablePath: process.env.BROWSER_EXECUTABLE_PATH ?? "/usr/bin/google-chrome", args: ["--ignore-certificate-errors", "--disable-gpu"] });
|
||||
const browser = await playwright.chromium.launch({ headless: process.env.HEADED !== "1", executablePath: process.env.BROWSER_EXECUTABLE_PATH ?? "/usr/bin/google-chrome", args: ["--ignore-certificate-errors", "--disable-gpu"] });
|
||||
const page = await browser.newPage({ viewport: { width: 1440, height: 1000 }, ignoreHTTPSErrors: true });
|
||||
const failures = [];
|
||||
const browserErrors = [];
|
||||
@@ -29,8 +29,8 @@ const state = () => main.evaluate((element) => ({
|
||||
source: element.dataset.axisStateSource,
|
||||
motion: element.dataset.axisMotionAuthority,
|
||||
task: element.dataset.axisTaskAuthority,
|
||||
machine: element.querySelector(".machine-state")?.textContent?.trim(),
|
||||
operation: element.querySelector(".operation-state")?.textContent?.trim(),
|
||||
machine: `Machine ${element.dataset.axisStateMachine}`,
|
||||
operation: `Operation ${element.dataset.axisStateOperation}`,
|
||||
case: element.querySelector(".case-status")?.textContent?.trim(),
|
||||
mode: element.dataset.axisTaskMode,
|
||||
program: element.dataset.axisProgramStatus,
|
||||
@@ -115,7 +115,7 @@ try {
|
||||
results.push(await record("MANUAL MODE", async () => { await main.getByRole("tab", { name: "Manual Control [F3]" }).click(); await wait((s) => s.mode === "MANUAL" || s.command?.includes("SET_MODE acknowledged"), "manual_mode_ack"); }));
|
||||
results.push(await record("HOME/TOUCH OFF boundaries", async () => {
|
||||
await click(main.locator('button[data-axis-control="manual-home-axis"]'), "home_axis_repeat");
|
||||
await wait((s) => s.error === null && s.command?.includes("HOME acknowledged"), "home_axis_ack");
|
||||
await wait((s) => s.error === null && s.command?.includes("HOME complete"), "home_joint_complete");
|
||||
await click(main.locator('button[data-axis-control="manual-touch-off"]'), "touch_off");
|
||||
await wait((s) => s.error === null && s.command?.includes("TOUCH_OFF acknowledged"), "touch_off_ack");
|
||||
if (!await main.locator('[data-axis-control="manual-tool-touch-off"]').isDisabled()) throw new Error("tool_touch_off_must_be_disabled");
|
||||
|
||||
Reference in New Issue
Block a user