按规划继续工作

结论:补齐 INI 派生自定义工具表路径的浏览器 OPFS 保存读回验证,继续通过 vendored LinuxCNC tooldata_save 路径覆盖。
This commit is contained in:
2026-06-08 11:41:41 +08:00
parent cf8c27404e
commit 441231cf5e
2 changed files with 31 additions and 1 deletions

View File

@@ -301,7 +301,9 @@ load/save behavior through vendored `tooldata_common.cc`, including the
non-random and random-toolchanger `tooldata_init()` branches, with the SDK non-random and random-toolchanger `tooldata_init()` branches, with the SDK
only copying text into the Emscripten filesystem and calling the exported C only copying text into the Emscripten filesystem and calling the exported C
ABI; the browser smoke checks the random-toolchanger `tooldata_save()` C ABI ABI; the browser smoke checks the random-toolchanger `tooldata_save()` C ABI
result before OPFS persistence writes the saved table text back. The same result before OPFS persistence writes the saved table text back, and verifies
that an INI-derived custom tool-table OPFS path can be saved and read back
after the table is loaded through vendored LinuxCNC. The same
Node WASM and browser interpreter smokes now validate the exported Node WASM and browser interpreter smokes now validate the exported
`Interp::init()`/`Interp::synch()` probe for initialization canonical events, `Interp::init()`/`Interp::synch()` probe for initialization canonical events,
metric/inch `emcStatus` machine-unit conversion, and current/selected tool metric/inch `emcStatus` machine-unit conversion, and current/selected tool

View File

@@ -599,6 +599,34 @@
"tool_1.comment=browser custom tool", "tool_1.comment=browser custom tool",
].join("\n"), ].join("\n"),
); );
const savedIniNamedToolTable = await saveMachineToolTableToOpfs(
interp,
"browser-ini-file-session",
{
opfsPath: loadedIniFileSession.toolTable.opfsPath,
wasmPath: loadedIniFileSession.toolTable.wasmPath,
},
);
verifyExpectedOutput(
"opfs_save_ini_named_tool_table",
savedIniNamedToolTable.result,
[
"tooldata_save=0",
"tool_1.toolno=8",
"tool_1.pocketno=8",
].join("\n"),
);
verifyExpectedOutput(
"opfs_saved_ini_named_tool_table_text",
await loadTextFile(loadedIniFileSession.toolTable.opfsPath),
[
"T8",
"P8",
"Z+4.500000",
"D+0.500000",
";browser custom tool",
].join("\n"),
);
await saveMachineTextFiles("browser-ini-override-session", { await saveMachineTextFiles("browser-ini-override-session", {
ini: [ ini: [