feat: 支持 SDK 屏幕图片与实时帧传输 - #19
Merged
Mr-KID-github merged 1 commit intoJul 31, 2026
Merged
Conversation
新增 display.show_image 与 display.stream 公共 API,支持 JPEG 字节、ImageFrame 和本地路径输入,并在发送前校验基线编码、尺寸及单帧大小边界。 通过 WSPK IMAGE/VIDEO 帧实现静态图片和限速实时帧发送;阻塞式帧生成器放到工作线程读取,避免占用传输事件循环,并使用终止帧明确结束视频流。 补充图片协议、能力协商、帧率限制、异常输入和传输节奏测试,同时更新中英文文档说明 15 FPS 上限与最新帧优先语义。 配套固件:WatcheRobot_esp32 仓库 codex/sdk-display-image-stream 分支。
Mr-KID-github
marked this pull request as ready for review
July 31, 2026 06:35
Mr-KID-github
merged commit Jul 31, 2026
c9f7cb3
into
codex/sdk-display-text-runtime
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
这是 issue #17 屏幕文字能力的后续数据面扩展:在设备已经开放
display.text的基础上,让上位机能够直接发送 JPEG,并以受控帧率持续发送实时画面。本 PR 为堆叠 PR,依赖 #18,当前以
codex/sdk-display-text-runtime为 base;请先完成基础文字能力评审。主要改动
app.robot.display.show_image(...),支持 JPEG 字节、ImageFrame和本地路径。app.robot.display.stream(..., fps=10),支持有限序列和实时生成器。IMAGE/VIDEO帧传输,视频流包含明确的首帧、关键帧和终止帧语义。TDD 与验证
python -m pytest:287 passed。python -m mypy src/watcherobot:52 个源文件无问题。git diff --check:通过。语义与限制
show_image()返回代表图片已成功交给传输层,不代表设备已经完成解码和刷新;首版协议没有增加逐帧渲染 ACK。