refactor(motor): P1 拆分 main.js + 收敛连接/总线状态机
R4 外提 scope/ota/seq/conn-poll;R5 waitVersion/queryNodeIdParam 下沉 transport;R6 ecat-bus 单点 bootstrap;R7 toast-stack + utils 去重。 main.js 4647→~1894 行。?v= 已 bump 20260924a。
This commit is contained in:
@@ -20,6 +20,11 @@
|
||||
* sendFrames(frames, {ch}) -> results[] frames=[{id,dlc,data}]
|
||||
* sendBurst(frames, {suffix,dlc}) -> results[]
|
||||
* fetchVersionNode(node) -> {node,seq,version,at?}|null
|
||||
* waitVersion(node, {prevSeq,sentAt,timeoutMs}) -> version|null
|
||||
* R5:版本等待下沉传输层,main 不再区分 wifi/ecat 双实现
|
||||
* queryNodeIdParam(node, selector) -> {ok,val?,oldFw?,desc?}
|
||||
* setNodeIdParam(node, selector, value) -> {ok,desc?}
|
||||
* R5:节点参数回执通道(WiFi 快照 / ECAT motor/rx)各在传输内消化
|
||||
* 可选:drainPendingRx() -> Promise 版本等待期强制消费批量接收区(ECAT)
|
||||
* setPeriod(ms) -> void 不支持则空实现
|
||||
* teardown() -> void 切走时收尾
|
||||
@@ -31,7 +36,7 @@
|
||||
"use strict";
|
||||
|
||||
import { createWifiTransport } from "./transport-wifi.js";
|
||||
import { createEcatTransport } from "./transport-ecat.js?v=20260923i";
|
||||
import { createEcatTransport } from "./transport-ecat.js?v=20260924a";
|
||||
|
||||
/** localStorage key:记住上次选的传输,刷新页面后保持 */
|
||||
export const LS_TRANSPORT = "dcu_motor_transport";
|
||||
|
||||
Reference in New Issue
Block a user