按规划继续工作

结论:补齐 LinuxCNC tooldata_common.cc 随机换刀器 load/save 验证边界,WASM/SDK/OPFS 只透传 random-toolchanger 配置;native、WASM、OPFS 和浏览器 smoke 验证已通过。
This commit is contained in:
2026-06-08 08:39:26 +08:00
parent a16f3605fa
commit 3f4eb06b47
12 changed files with 211 additions and 28 deletions

View File

@@ -40,7 +40,11 @@ vendored LinuxCNC RS274NGC sources and exposes:
- `runFileWithIni(path, iniPath)`
- `restoreParameters(path)`
- `saveParameters(path, values)`
- `loadToolTable(path)`
- `loadToolTable(path, options)`
- `saveToolTable(path)`
- `writeTextFile(path, text)`
- `readTextFile(path)`
`loadToolTable()` accepts `{ randomToolChanger: true }` to select the
LinuxCNC random-toolchanger branch before calling vendored
`tooldata_load()`. The SDK only forwards that runtime boundary flag.

View File

@@ -85,8 +85,11 @@ export async function createLinuxCncInterpSdk(moduleOptions = {}) {
return callStringResult(mod, "lcinterp_save_parameters", path, assignments);
},
loadToolTable(path) {
return callStringResult(mod, "lcinterp_load_tool_table", path);
loadToolTable(path, options = {}) {
const functionName = options.randomToolChanger
? "lcinterp_load_tool_table_random"
: "lcinterp_load_tool_table";
return callStringResult(mod, functionName, path);
},
saveToolTable(path) {