按规划继续工作
结论:新增命名参数直接查找的 WASM 和浏览器验证,继续通过 vendored LinuxCNC find_named_param 路径覆盖 INI/HAL 边界。
This commit is contained in:
@@ -128,6 +128,9 @@
|
||||
},
|
||||
});
|
||||
|
||||
const namedParamIniPath = "/work/namedparams.ini";
|
||||
interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini"));
|
||||
|
||||
verifyExpectedOutput(
|
||||
"probe_init_and_synch",
|
||||
interp.probeInitAndSynch(),
|
||||
@@ -172,6 +175,31 @@
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
verifyExpectedOutput(
|
||||
"probe_named_parameters",
|
||||
interp.probeNamedParameters(namedParamIniPath),
|
||||
[
|
||||
"init_named_parameters=0",
|
||||
"global_named_count=57",
|
||||
"_metric_machine: rc=0 found=1 value=1",
|
||||
"_motion_mode: rc=0 found=1 value=10",
|
||||
"_metric: rc=0 found=1 value=1",
|
||||
"_feed: rc=0 found=1 value=123.45",
|
||||
"_rpm: rc=0 found=1 value=678.9",
|
||||
"_x: rc=0 found=1 value=1.25",
|
||||
"_current_tool: rc=0 found=1 value=12",
|
||||
"_ini[traj]max_linear_velocity: rc=0 found=1 value=35",
|
||||
"_hal[standalone.pin-bit]: rc=0 found=1 value=1",
|
||||
"_hal[standalone.signal-float]: rc=0 found=1 value=98.25",
|
||||
"_hal[standalone.param-s32]: rc=0 found=1 value=-17",
|
||||
"_hal[standalone.pin-u32]: rc=0 found=1 value=1.23457e+08",
|
||||
"_hal[standalone.signal-s64]: rc=0 found=1 value=-9e+09",
|
||||
"_hal[standalone.param-u64]: rc=0 found=1 value=9e+09",
|
||||
"_hal[standalone.disconnected-float]: rc=0 found=1 value=12.5",
|
||||
"_hal[standalone.missing]: rc=0 found=0 value=0",
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
for (const fixtureName of INTERP_BROWSER_MDI_FIXTURES) {
|
||||
const programText = await fetchText(`../fixtures/gcode/${fixtureName}.ngc`);
|
||||
const expectedText = await fetchText(`../fixtures/canon/${fixtureName}.events`);
|
||||
@@ -199,14 +227,12 @@
|
||||
);
|
||||
}
|
||||
|
||||
const namedParamIniPath = "/work/namedparams.ini";
|
||||
const namedParamProgramText = await fetchText(
|
||||
`../fixtures/gcode/${INTERP_INI_FIXTURE}.ngc`,
|
||||
);
|
||||
const namedParamExpectedText = (
|
||||
await fetchText(`../fixtures/canon/${INTERP_INI_FIXTURE}.events`)
|
||||
).trimEnd();
|
||||
interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini"));
|
||||
verifyExpectedOutput(
|
||||
INTERP_INI_FIXTURE,
|
||||
interp.runProgramWithIni(namedParamProgramText, namedParamIniPath),
|
||||
|
||||
Reference in New Issue
Block a user