We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 619ff4a commit 3174cb7Copy full SHA for 3174cb7
Firmware/RTK_Surveyor/Tasks.ino
@@ -408,8 +408,15 @@ void handleGNSSDataTask(void *e)
408
long startTime = millis();
409
410
sdBytesToRecord = ubxFile->write(&ringBuffer[sdTail], sliceToRecord);
411
+ static unsigned long lastFlush = 0;
412
if (USE_MMC_MICROSD)
- ubxFile->flush();
413
+ {
414
+ if (millis() > (lastFlush + 250)) // Flush every 250ms, not every write
415
416
+ ubxFile->flush();
417
+ lastFlush += 250;
418
+ }
419
420
fileSize = ubxFile->fileSize(); //Update file size
421
422
sdFreeSpace -= sliceToRecord; //Update remaining space on SD
0 commit comments