按规划继续工作
结论:接入 LinuxCNC iniFindBool 到 INI WASM/SDK,并让 machine-session bridge 通过 vendored INI 解析 [EMCIO]RANDOM_TOOLCHANGER 后透传给 tooldata;native、WASM、OPFS 和浏览器 smoke 验证已通过。
This commit is contained in:
@@ -55,6 +55,23 @@ export async function createLinuxCncIniSdk(moduleOptions = {}) {
|
||||
}
|
||||
},
|
||||
|
||||
getBool(path, section, tag) {
|
||||
const pathPtr = allocCString(mod, path);
|
||||
const sectionPtr = allocCString(mod, section);
|
||||
const tagPtr = allocCString(mod, tag);
|
||||
const outPtr = mod._malloc(4);
|
||||
|
||||
try {
|
||||
const rc = mod._lcini_get_bool(pathPtr, sectionPtr, tagPtr, outPtr);
|
||||
return rc === 0 ? mod.HEAP32[outPtr >> 2] !== 0 : null;
|
||||
} finally {
|
||||
mod._free(pathPtr);
|
||||
mod._free(sectionPtr);
|
||||
mod._free(tagPtr);
|
||||
mod._free(outPtr);
|
||||
}
|
||||
},
|
||||
|
||||
getFields(path, fields) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(fields).map(([name, query]) => [
|
||||
|
||||
Reference in New Issue
Block a user