Adding clearFileBuffer and clearMaxFileBufferAvail

This commit is contained in:
PaulZC
2021-03-30 10:51:28 +01:00
parent fb76790842
commit 2ec3077fa6
3 changed files with 20 additions and 2 deletions
@@ -3055,6 +3055,20 @@ uint16_t SFE_UBLOX_GNSS::getMaxFileBufferAvail(void)
return (fileBufferMaxAvail);
}
// Clear the file buffer - discard all contents
void SFE_UBLOX_GNSS::clearFileBuffer(void)
{
if (fileBufferSize == 0) // Bail if the user has not called setFileBufferSize (probably redundant)
return;
fileBufferTail = fileBufferHead;
}
// Reset fileBufferMaxAvail
void SFE_UBLOX_GNSS::clearMaxFileBufferAvail(void)
{
fileBufferMaxAvail = 0;
}
// PRIVATE: Create the file buffer. Called by .begin
boolean SFE_UBLOX_GNSS::createFileBuffer(void)
{