Skip to content

Commit

Permalink
fix(ddp): remove unneeded buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt authored and ph1p committed Feb 23, 2025
1 parent 460996b commit 7b7fed5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/plugins/DDPPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ void DDPPlugin::setup()
Serial.println(" port: 4048");

udp->onPacket([](AsyncUDPPacket packet)
{
uint8_t buffer[ROWS * COLS];
memset(buffer, 0, sizeof(buffer));

{
if (packet.length() >= 10) { // Basic DDP header check
const uint8_t* data = packet.data() + 10; // Skip header
const size_t dataLength = packet.length() - 10;
Expand All @@ -30,7 +27,8 @@ void DDPPlugin::setup()
Screen.setPixelAtIndex(i, brightness > 4, brightness);
}
}
} });
}
});
}
}

Expand Down

0 comments on commit 7b7fed5

Please sign in to comment.