feat: sync axis task state parity work
This commit is contained in:
@@ -54,3 +54,60 @@
|
||||
### 下一步
|
||||
|
||||
从 `04-任务矩阵.md` 的 `W9-001` 开始,先补 Run 状态门禁矩阵和 WASM Node 验证。
|
||||
|
||||
## 2026-07-07 17:12 EDT - 第 1 轮:执行过程按钮闭环
|
||||
|
||||
### 本轮目标
|
||||
|
||||
完成 `W9-001` 至 `W9-011`:补齐 Run 的 LinuxCNC 风格硬门禁、program/canonical plan 边界、Home 过程态、task/motion status 投影、Pause/Resume/Step 回归、浏览器 trace 验收和构建同步。
|
||||
|
||||
### 本轮做了什么
|
||||
|
||||
1. 在 WASM task runtime 中增加 Run 门禁:必须 `state=ON`、`mode=AUTO`、`interpState=IDLE`、已 Home 或 `noForceHoming`、已 open 程序、已加载 motion plan。
|
||||
2. 增加 status 字段:`task.file`、`programOpen`、`programStartLine`、`planId`、`motionPlanLoaded`、`errorText`、`allHomed`、`homing`、`homeState`、`noForceHoming`。
|
||||
3. 将 Home 改成可观测过程态:先 `homing=true/homeState=HOMING`,task cycle 后进入 `allHomed=true/homeState=HOMED`。
|
||||
4. motion runtime status 增加 `queueDepth`、`activeDepth`、`motion.id` 等执行推进字段。
|
||||
5. Web runtime/status 归一化读取新增字段;Web policy 将 homing、program open、motion plan 状态纳入 Run 门禁。
|
||||
6. Web store 的 task/HAL Run 不再点击后直接写 `runState=running`,而是等待 task/HAL status 投影;Run 命令链负责发送 `MODE_AUTO` 和 `EMC_TASK_PLAN_RUN`。
|
||||
7. 修复 Home 与 Set Mode 连续操作的竞态:Home 过程态下允许 Auto 请求排队,但 Run 在 homing 未完成前仍被拒绝。
|
||||
8. 新增 `verify_task_state_matrix.mjs`,并更新 WASM/Web Node 测试以匹配 working9 的 motion plan 必需语义。
|
||||
9. 重建 WASM 与 Web dist,执行 Node、trace、50ms 浏览器验收。
|
||||
|
||||
### 改了哪些文件
|
||||
|
||||
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_task_hal_wasm.cpp`
|
||||
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_motion_runtime.c`
|
||||
- `wasm-port/tests/wasm/node/verify_task_hal_wasm.mjs`
|
||||
- `wasm-port/tests/wasm/node/verify_task_state_matrix.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/runtime/linuxcnc-task-hal-runtime.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/state/linuxcnc-task-policy.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/state/store.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_linuxcnc_task_hal_runtime.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_run_preconditions.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/*`
|
||||
- `work/working9-执行过程按钮/03-推进台账.md`
|
||||
- `work/working9-执行过程按钮/04-任务矩阵.md`
|
||||
- `work/working9-执行过程按钮/05-验收证据.md`
|
||||
- `work/working9-执行过程按钮/06-决策记录.md`
|
||||
|
||||
### 验证了什么
|
||||
|
||||
- WASM build、WASM task/HAL smoke、Run 状态门禁矩阵。
|
||||
- Web build、Run feedback loop、Run preconditions、task/HAL runtime smoke。
|
||||
- 浏览器 trace:Pause 后位置冻结。
|
||||
- 50ms 截图验收:ESTOP、Power、Home、Run、Pause 流程通过。
|
||||
|
||||
### 结果与证据
|
||||
|
||||
证据已追加至 `05-验收证据.md` 的 `2026-07-07 17:12 EDT - 任务 W9-001 至 W9-011`。
|
||||
|
||||
关键结论:
|
||||
|
||||
- `task_state_matrix=ok`
|
||||
- `run_feedback_status_loop_smoke=ok`
|
||||
- `pause_position_status=passed-position-frozen`
|
||||
- `verification_status=passed`
|
||||
|
||||
### 下一步
|
||||
|
||||
working9 已闭环。后续若继续推进,应进入更完整的 LinuxCNC interpreter canonical output 替换当前受控 motion plan 适配层,而不是恢复 JS/G-code 正则执行 fallback。
|
||||
|
||||
Reference in New Issue
Block a user