feat(mtc): .mt 脚本编译器落地 + pybot 扬声器静音语义

mtc 新模块:命令式动作脚本(Python DSL)→ .mt 矩阵编译器,非阻塞时间轴 IR(重叠截断/rest 静止值)+ 10ms 栅格化,产物可由 pybot/bot4cj 直接执行;34 测试全绿(含 pybot parser e2e)。

pybot speaker.py:frequency<=0 改为静音节拍(仅 sleep 保时序,不再钳到 min_f 低鸣),对齐仓颉版 sleep 占位语义;mtc Beep 通道 rest=0,段前/段间/段后回落静音,两侧语义闭环。

修复 test_actpred_compatibility 过时断言(99c1bc1 首行分解为重复微步 19→20 帧时漏改,14→15)。

文档三处同步:根 README 回填 memdb/pybot/actpred 并新增 mtc(模块表+端口一览+章节),MODULES/ARCHITECTURE 同步 mtc,新建 mtc/README.md。
This commit is contained in:
qing committed 2026-08-15 13:54:47 +08:00
1 parent 205a60f039
commit 01126a5786
18 files changed
+1125 -7

No files matched your search

+3 -2
View File
@@ -439,8 +439,9 @@ def test_actpred_compatibility(tmp_path, mock_i2c):
from dataset import ActionDataset
ds = ActionDataset(str(tmp_path), history_len=5,
action_dim=18, frame_len=3)
# 19 帧,start=max(5,2)=5,samples: t=5..18 → 14 个样本
assert len(ds) == 14
# 20 帧(10 行 × 2 微步,99c1bc1 起首行也分解为重复步),
# start=max(5,2)=5,samples: t=5..19 → 15 个样本
assert len(ds) == 15
sample = ds[0]
# ActionDataset 默认 resize 到 640×480,与相机原始尺寸无关
assert sample["images"].shape == (3, 3, 480, 640) # (F, C, H, W)