按规划继续工作
结论:接入 LinuxCNC iniFindBool 到 INI WASM/SDK,并让 machine-session bridge 通过 vendored INI 解析 [EMCIO]RANDOM_TOOLCHANGER 后透传给 tooldata;native、WASM、OPFS 和浏览器 smoke 验证已通过。
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
<body>
|
||||
<pre id="status">running</pre>
|
||||
<script type="module">
|
||||
import { createLinuxCncInterpSdk } from "../../runtime/sdk/src/index.js";
|
||||
import {
|
||||
createLinuxCncIniSdk,
|
||||
createLinuxCncInterpSdk,
|
||||
} from "../../runtime/sdk/src/index.js";
|
||||
import {
|
||||
saveMachineParametersToOpfs,
|
||||
} from "../../runtime/opfs/linuxcnc-parameter-bridge.js";
|
||||
@@ -68,6 +71,18 @@
|
||||
console.error(message);
|
||||
},
|
||||
});
|
||||
const ini = await createLinuxCncIniSdk({
|
||||
locateFile(path) {
|
||||
if (path === "linuxcnc_ini.wasm") {
|
||||
return "../../runtime/ui/ini-panel/linuxcnc_ini.wasm";
|
||||
}
|
||||
return path;
|
||||
},
|
||||
print() {},
|
||||
printErr(message) {
|
||||
console.error(message);
|
||||
},
|
||||
});
|
||||
|
||||
for (const fixtureName of INTERP_BROWSER_MDI_FIXTURES) {
|
||||
const programText = await fetchText(`../fixtures/gcode/${fixtureName}.ngc`);
|
||||
@@ -236,7 +251,14 @@
|
||||
);
|
||||
|
||||
await saveMachineTextFiles("browser-random-toolchanger", {
|
||||
ini: "[EMC]\nMACHINE = browser-random-toolchanger\n",
|
||||
ini: [
|
||||
"[EMC]",
|
||||
"MACHINE = browser-random-toolchanger",
|
||||
"",
|
||||
"[EMCIO]",
|
||||
"RANDOM_TOOLCHANGER = yes",
|
||||
"",
|
||||
].join("\n"),
|
||||
toolTable: [
|
||||
"T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser random finish tool",
|
||||
"T5 P9 X1 Y2 Z3 ;browser random rough tool",
|
||||
@@ -255,10 +277,10 @@
|
||||
interp,
|
||||
"browser-random-toolchanger",
|
||||
{
|
||||
iniSdk: ini,
|
||||
iniWasmPath: "/work/browser-random-machine.ini",
|
||||
parameterWasmPath: "/work/browser-random-linuxcnc.var",
|
||||
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
||||
randomToolChanger: true,
|
||||
},
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
|
||||
Reference in New Issue
Block a user