@@ -492,7 +492,7 @@ TaskHandle_t pinBluetoothTaskHandle; // Dummy task to start hardware on an assig
492
492
volatile bool bluetoothPinned; // This variable is touched by core 0 but checked by core 1. Must be volatile.
493
493
494
494
volatile static int combinedSpaceRemaining; // Overrun indicator
495
- volatile static long fileSize ; // Updated with each write
495
+ volatile static uint64_t logFileSize ; // Updated with each write
496
496
int bufferOverruns; // Running count of possible data losses since power-on
497
497
498
498
bool zedUartPassed; // Goes true during testing if ESP can communicate with ZED over UART
@@ -721,7 +721,7 @@ bool forceSystemStateUpdate; // Set true to avoid update wait
721
721
uint32_t lastPrintRoverAccuracy;
722
722
uint32_t lastBaseLEDupdate; // Controls the blinking of the Base LED
723
723
724
- uint32_t lastFileReport; // When logging, print file record stats every few seconds
724
+ uint32_t lastFileReport = 0 ; // When logging, print file record stats every few seconds
725
725
long lastStackReport; // Controls the report rate of stack highwater mark within a task
726
726
uint32_t lastHeapReport; // Report heap every 1s if option enabled
727
727
uint32_t lastTaskHeapReport; // Report task heap every 1s if option enabled
@@ -731,7 +731,7 @@ uint32_t lastRTCSync; // Time in millis when the RTC was last sync'd
731
731
bool rtcSyncd; // Set to true when the RTC has been sync'd via TP pulse
732
732
uint32_t lastPrintPosition; // For periodic display of the position
733
733
734
- uint64_t lastLogSize;
734
+ uint64_t lastLogSize = 0 ;
735
735
bool logIncreasing; // Goes true when log file is greater than lastLogSize or logPosition changes
736
736
bool reuseLastLog; // Goes true if we have a reset due to software (rather than POR)
737
737
@@ -1398,18 +1398,19 @@ void logUpdate()
1398
1398
// Report file sizes to show recording is working
1399
1399
if ((millis () - lastFileReport) > 5000 )
1400
1400
{
1401
- if (fileSize > 0 )
1401
+ if (logFileSize > 0 )
1402
1402
{
1403
1403
lastFileReport = millis ();
1404
+
1404
1405
if (settings.enablePrintLogFileStatus )
1405
1406
{
1406
- systemPrintf (" Log file size: %ld " , fileSize );
1407
+ systemPrintf (" Log file size: %lld " , logFileSize );
1407
1408
1408
1409
if ((systemTime_minutes - startLogTime_minutes) < settings.maxLogTime_minutes )
1409
1410
{
1410
1411
// Calculate generation and write speeds every 5 seconds
1411
- uint32_t fileSizeDelta = fileSize - lastLogSize;
1412
- systemPrintf (" - Generation rate: %0.1fkB/s" , fileSizeDelta / 5.0 / 1000.0 );
1412
+ uint64_t fileSizeDelta = logFileSize - lastLogSize;
1413
+ systemPrintf (" - Generation rate: %0.1fkB/s" , (( float ) fileSizeDelta) / 5.0 / 1000.0 );
1413
1414
}
1414
1415
else
1415
1416
{
@@ -1419,9 +1420,9 @@ void logUpdate()
1419
1420
systemPrintln ();
1420
1421
}
1421
1422
1422
- if (fileSize > lastLogSize)
1423
+ if (logFileSize > lastLogSize)
1423
1424
{
1424
- lastLogSize = fileSize ;
1425
+ lastLogSize = logFileSize ;
1425
1426
logIncreasing = true ;
1426
1427
}
1427
1428
else
0 commit comments