feat(bridge): alt(331f) 写通道——build 4 + CLI raw --channel alt,测试全绿

This commit is contained in:
agent committed 2026-07-28 16:11:26 +00:00
1 parent c4f577905f
commit 4db823f207
6 files changed
+30 -9

No files matched your search

+3 -1
View File
@@ -172,7 +172,7 @@ def build_parser() -> argparse.ArgumentParser:
sp = sub.add_parser("raw", help="高级命令:直发 hex")
sp.add_argument("hex")
sp.add_argument("--channel", default="rxtx", choices=["rxtx", "epd"])
sp.add_argument("--channel", default="rxtx", choices=["rxtx", "epd", "alt"])
sp.add_argument("--no-response", action="store_true")
sp = sub.add_parser("ota", help="SUOTA 固件升级(高危,需确认)")
@@ -255,6 +255,8 @@ async def _run_command(args, t):
data = bytes.fromhex(args.hex)
if args.channel == "epd":
await t.write_epd(data, response=not args.no_response)
elif args.channel == "alt":
await t.write_alt(data, response=not args.no_response)
else:
await t.write_rxtx(data, response=not args.no_response)
return {"sent": len(data)}