Repository navigation
fix: YL3 frames from several pieces in one datagram (#187) - #224
Conversation
|
Checked on Aceline-1 (2.17, 4309e31) with a fake YL3 on the lab host (CTP on TCP 3333, then 240×320 JPEGs of ~21 KB at 10 fps to UDP 2224, cut into 2964-byte pieces, all pieces of a frame in one datagram, headers as the real toy sends them): 90 datagrams → 90 frames, 0 dropped, 10 fps, turned 90° and upright, picture and colours as sent. Grid and the other slots play as before. |
PR Summary by QodoFix YL3 video frames spanning multiple pieces in one UDP datagram
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
…being put together (Qodo on #224)
Closes #187. Version 2.16 (#220 moves to 2.17).
The YL3 report on 2.15 showed the picture upright and whole but freezing after 0.5–1 s, with odd colours and blocks. Its log and raw frame explain it: a datagram on UDP 2224 can hold several pieces one after another, each with its own 20-byte header (3104 bytes = 20 + 2964 + 20 + 100 for a 3064-byte frame; 4640 = 20 + 2964 + 20 + 1636 for a 4600-byte one).
RtStream.feed()now walks all pieces in a datagram; a completed frame is copied out, so a datagram that also starts the next frame doesn't overwrite it. Tests:rtStreamTwoPiecesInOneDatagram, existing ones.