拆分仿真测试程序目录

结论:将内置 G-code 测试程序从 simulation-app.js 移入 runtime/ui/simulation/programs/,建立一程序一模块的目录化程序库,并保持页面 API 与验证 gate 兼容。
This commit is contained in:
2026-06-16 22:03:06 +08:00
parent db83ad29f3
commit 163a68ff42
12 changed files with 193 additions and 95 deletions

View File

@@ -55,7 +55,7 @@ Browser JavaScript must not implement:
The current simulation page already has:
- LinuxCNC interpreter WASM execution through `createLinuxCncInterpSdk()`;
- selectable test programs;
- selectable test programs under `runtime/ui/simulation/programs/`;
- canonical output rendering;
- program-line rendering;
- motion table;
@@ -134,6 +134,17 @@ Upgrade the G-code pane and execution controls:
- highlight active G-code line and current motion row;
- show run status, source program, motion count, and current frame.
Built-in test programs must live in:
```text
runtime/ui/simulation/programs/
```
Each program should have its own module and be exported through
`runtime/ui/simulation/programs/index.js`. The simulation renderer should keep
importing the inventory through the program index rather than embedding G-code
fixtures in `simulation-app.js`.
Validation:
- browser smoke runs at least one linear program, one arc program, and one