-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
DDP input: reject packets with unsupported data type or non-display destination #5390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
635a9e0
f884deb
b1757c3
d2df7a4
079dbec
e02c126
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| . | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,12 @@ static void handleDDPPacket(e131_packet_t* p) { | |
| static bool ddpSeenPush = false; // have we seen a push yet? | ||
| int lastPushSeq = e131LastSequenceNumber[0]; | ||
|
|
||
| // reject unsupported data types (only RGB and RGBW are supported) | ||
| if (p->dataType != DDP_TYPE_RGB24 && p->dataType != DDP_TYPE_RGBW32) return; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DedeHai this is the core change, right?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that plus the next line, the rest was just moving the defines (and renaming)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I read the DDP specs correctly, datatype can also be 0 = not used / undefined. |
||
|
|
||
| // reject status and config packets (not implemented) | ||
| if (p->destination == DDP_ID_STATUS || p->destination == DDP_ID_CONFIG) return; | ||
|
|
||
| //reject late packets belonging to previous frame (assuming 4 packets max. before push) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DedeHai maybe also check if this assumption "max 4 packets per push" still makes sense. Not sure how many LEDs fit into one packet - but considering maybe 4 packets * 512 LEDs as the absolute max content per frame doesn't sound right to me - we can support more than 2048 LEDs for example with HUB75.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needs investigation. I have pushed 64x64 over websocket no problem - not sure how big one WS packet is but code comments suggest its about 500 LEDs worth.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've created an issue ticket so we can come back to this question later. |
||
| if (e131SkipOutOfSequence && lastPushSeq) { | ||
| int sn = p->sequenceNum & 0xF; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.