Skip to content

Commit

Permalink
fix for bigger images
Browse files Browse the repository at this point in the history
  • Loading branch information
d03n3rfr1tz3 committed Apr 28, 2024
1 parent 4265ac3 commit 82337f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/input/tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ void TcpInput::disconnect(void *arg, AsyncClient *client) {
*/
void TcpInput::queue(void *parameter) {
size_t previousSize = 0;
uint8_t previousBuffer[210];
uint8_t previousBuffer[210] = { 0x00 };

while (true) {
data_packet_t dataPacket;
if (xQueueReceive(parsePacketQueue, &dataPacket, (TickType_t)10) == pdPASS) {
if (xQueueReceive(parsePacketQueue, &dataPacket, (TickType_t)25) == pdPASS) {
size_t off = 0;
size_t maxImage = 274;
size_t maxAnimation = 210;
Expand All @@ -149,7 +149,7 @@ void TcpInput::queue(void *parameter) {

// copy rest of the current buffer into previous buffer
if (previousSize > 0) {
memcpy(previousBuffer, buffer, use - previousSize);
memcpy(previousBuffer + previousSize, buffer, use - previousSize);
}

// parse and process packet
Expand Down

0 comments on commit 82337f0

Please sign in to comment.