feat(web): 桌面原生桥 + 配置落盘 + 无设备静默态;排除调试脚本

变更点:
1. esp32_server.py
   - /api/motor/ui-state、/api/lab/ui-state:配置原子落盘 data/*.json(WebView2 清存储仍在)
   - _GuiApi.ecat_api/bridge_info:桌面壳经 GUI 进程裸 socket 直连 ecat_native,不经浏览器 HTTP
2. js/common/desktop-bridge.js(新)
   - 探测 pywebview.api(含 iframe top/parent),transport-ecat 优先走原生桥
3. connection.js + responsive.css + components.css
   - setQuietMode:离线且无传输时 html[data-dcu-calm=1] 掐常驻动画
   - 进度条斜纹仅 .live 挂载,空闲不再按刷新率空转重绘
4. device-link.js
   - 先查 native/health,已健康跳过 motor/start,避免 loop_stop 重进 OP 假超时
   - 周期强制 0.25ms + DC SYNC0 对齐;轮询自愈被配错的 DC/周期
5. motor/main.js + transport-ecat.js
   - 配置双写 localStorage + 磁盘 ui-state;pagehide/sendBeacon 刷盘;导入导出
   - 探测代际 probeGen;ECAT 失败阈值 12;跟踪 bootActive/slaveAl/slaveOp
6. lab/spi_test.html、ota/boot_ecat.js、can_monitor 等跟随桥/静默态
7. .gitignore
   - 排除 scripts/_* 与 anal/collect/measure/trace 等调试脚本、lab 产物、data/ 运行态
This commit is contained in:
cbb
2026-09-20 22:58:00 +08:00
parent e91d53e0fc
commit 383535bd1d
23 changed files with 2060 additions and 283 deletions
+24 -2
View File
@@ -93,6 +93,26 @@
50% { opacity: 1; }
}
/* ================= 无设备静默态:掐掉常驻动画 =================
* 常驻动画按显示器刷新率逐帧跑:本机 160Hz 实测「没接设备」时
* 主线程 140ms/s 全在重算+重绘(160 次/s recalc),renderer+GPU 各占约
* 一核的七成;全关后回到 ~0。设备离线且无传输在跑时这些动效没有任何
* 信息量,故由连接态统一挂 html[data-dcu-calm="1"] 关掉。
* 只掐 infinite 装饰动效;一次性入场/吐司动画与故障灯保留。 */
html[data-dcu-calm="1"] .progress-fill,
html[data-dcu-calm="1"] .progress-fill::after,
html[data-dcu-calm="1"] .heap-bar-track::after,
html[data-dcu-calm="1"] .status-task-bar::after,
html[data-dcu-calm="1"] .stage-status-bar .ssb-dot,
html[data-dcu-calm="1"] .pill.live .indicator,
html[data-dcu-calm="1"] .conn-indicator.warn .light,
html[data-dcu-calm="1"] .brand-logo::before,
html[data-dcu-calm="1"] .header-brand .dot-mark::before,
html[data-dcu-calm="1"] .header-brand .dot-mark::after,
html[data-dcu-calm="1"] .led-pulse {
animation: none !important;
}
/* ================= 入场:头部 + 卡片错落浮现 ================= */
.header-bar { animation: fadeInUp .5s ease both; }
.main-layout > div > .card { animation: fadeInUp .55s ease both; }
@@ -169,15 +189,17 @@
/* ================= 文件信息浮现 ================= */
.file-info.show { animation: fadeInUp .3s ease both; }
/* ================= 进度条:流动斜纹 ================= */
/* ================= 进度条:流动斜纹 =================
* 斜纹只在真的有进度时挂(.live 由 setProgress/setEcatPct 开关):
* 空闲时进度条 width:0%,看不见却在按刷新率重绘,纯白烧。 */
.progress-fill {
background-image:
linear-gradient(90deg, var(--esp32), #14b8a6),
repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 10px, rgba(255,255,255,0) 10px 20px);
background-size: 100% 100%, 200% 100%;
background-blend-mode: normal, overlay;
animation: flowDash 1.4s linear infinite;
}
.progress-fill.live { animation: flowDash 1.4s linear infinite; }
.progress-fill.done { animation: none; }
/* ================= 阶段胶囊:激活弹入 ================= */