Skip to content

Commit

Permalink
Added debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMueller2003 committed Jul 13, 2024
1 parent e4529c1 commit 270ef0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ESPixelStick/src/WebMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,14 +648,15 @@ size_t c_WebMgr::GetFseqFileListChunk(uint8_t *buffer, size_t maxlen, size_t ind
}
break;
}
// is it a new request

// DEBUG_V("is it a new request");
if (index == 0)
{
NumberOfBytesTransfered = 0; // reset the log line index when we get a new request
TotalFileSizeToTransfer = 0;
buffer[0] = '\0';

// Try to open the file
// DEBUG_V("Try to open the file");
if(!FileMgr.OpenSdFile(FSEQFILELIST, c_FileMgr::FileMode::FileRead, FileHandle))
{
logcon(F("ERROR: Could not open List of Fseq files for reading"));
Expand All @@ -665,6 +666,7 @@ size_t c_WebMgr::GetFseqFileListChunk(uint8_t *buffer, size_t maxlen, size_t ind
break;
}

// DEBUG_V("Get the file size");
TotalFileSizeToTransfer = FileMgr.GetSdFileSize(FileHandle);
}

Expand Down Expand Up @@ -696,14 +698,15 @@ size_t c_WebMgr::GetFseqFileListChunk(uint8_t *buffer, size_t maxlen, size_t ind
break;
}

// DEBUG_V("Read a chunk");
memset(buffer, 0x0, maxlen-1);
FileMgr.ReadSdFile(FileHandle,
buffer,
DataToSendThisChunk);
// buffer[DataToSendThisChunk] = 'A';
NumberOfBytesTransfered += DataToSendThisChunk;
response = DataToSendThisChunk;
// DEBUG_VV(String("buffer: ") + String((char*)buffer));
// DEBUG_V(String("buffer: ") + String((char*)buffer));

} while(false);

Expand Down

0 comments on commit 270ef0a

Please sign in to comment.