@@ -45,7 +45,7 @@ void menuLogSelection()
45
45
else
46
46
printUnknown (incoming);
47
47
}
48
- clearBuffer (); // Empty buffer of any newline chars
48
+ clearBuffer (); // Empty buffer of any newline chars
49
49
}
50
50
}
51
51
@@ -268,7 +268,7 @@ void menuMessagesBaseRTCM()
268
268
// Based on GPS data/time, create a log file in the format SFE_Everywhere_YYMMDD_HHMMSS.ubx
269
269
bool beginLogging ()
270
270
{
271
- return (beginLogging (nullptr ));
271
+ return (beginLogging (nullptr ));
272
272
}
273
273
274
274
bool beginLogging (const char *customFileName)
@@ -308,18 +308,17 @@ bool beginLogging(const char *customFileName)
308
308
309
309
if (strlen (logFileName) == 0 )
310
310
{
311
- // u-blox platforms use ubx file extension for logs, all others use TXT
311
+ // u-blox platforms use ubx file extension for logs, all others use TXT
312
312
char fileExtension[4 ] = " ubx" ;
313
- if (present.gnss_zedf9p == false )
313
+ if (present.gnss_zedf9p == false )
314
314
strncpy (fileExtension, " txt" , sizeof (fileExtension));
315
315
316
316
snprintf (logFileName, sizeof (logFileName), " /%s_%02d%02d%02d_%02d%02d%02d.%s" , // SdFat library
317
317
platformFilePrefix, rtc.getYear () - 2000 , rtc.getMonth () + 1 ,
318
318
rtc.getDay (), // ESP32Time returns month:0-11
319
319
rtc.getHour (true ), rtc.getMinute (),
320
320
rtc.getSecond (), // ESP32Time getHour(true) returns hour:0-23
321
- fileExtension
322
- );
321
+ fileExtension);
323
322
}
324
323
}
325
324
else
@@ -335,7 +334,7 @@ bool beginLogging(const char *customFileName)
335
334
if (!logFile)
336
335
{
337
336
systemPrintln (" Failed to allocate logFile!" );
338
- return (false );
337
+ return (false );
339
338
}
340
339
}
341
340
@@ -352,11 +351,11 @@ bool beginLogging(const char *customFileName)
352
351
systemPrintf (" Failed to create GNSS log file: %s\r\n " , logFileName);
353
352
online.logging = false ;
354
353
xSemaphoreGive (sdCardSemaphore);
355
- return (false );
354
+ return (false );
356
355
}
357
356
358
357
logFileSize = 0 ;
359
- lastLogSize = 0 ; // Reset counter - used for displaying active logging icon
358
+ lastLogSize = 0 ; // Reset counter - used for displaying active logging icon
360
359
lastFileReport = millis (); // Fake last file report to avoid an immediate timeout
361
360
362
361
bufferOverruns = 0 ; // Reset counter
@@ -371,9 +370,9 @@ bool beginLogging(const char *customFileName)
371
370
if ((24 * 60 * 2 ) % settings.maxLogLength_minutes == 0 )
372
371
{
373
372
// Calculate when the next log file should be opened - in millis()
374
- unsigned long hoursAsMillis = rtc.getMillis () + (rtc.getSecond () * 1000 )
375
- + (rtc.getMinute () * 1000 * 60 )
376
- + (rtc.getHour (true ) * 1000 * 60 * 60 );
373
+ unsigned long hoursAsMillis = rtc.getMillis () + (rtc.getSecond () * 1000 ) +
374
+ (rtc.getMinute () * 1000 * 60 ) +
375
+ (rtc.getHour (true ) * 1000 * 60 * 60 );
377
376
unsigned long maxLogLength_ms = (unsigned long )settings.maxLogLength_minutes * 60 * 1000 ;
378
377
unsigned long millisFromPreviousLog = hoursAsMillis % maxLogLength_ms;
379
378
unsigned long millisToNextLog = maxLogLength_ms - millisFromPreviousLog;
@@ -480,7 +479,7 @@ bool beginLogging(const char *customFileName)
480
479
// A retry will happen during the next loop, the log will eventually be opened
481
480
log_d (" Failed to get file system lock to create GNSS log file" );
482
481
online.logging = false ;
483
- return (false );
482
+ return (false );
484
483
}
485
484
486
485
systemPrintf (" Log file name: %s\r\n " , logFileName);
@@ -512,7 +511,7 @@ void endLogging(bool gotSemaphore, bool releaseSemaphore)
512
511
char nmeaMessage[82 ]; // Max NMEA sentence length is 82
513
512
createNMEASentence (CUSTOM_NMEA_TYPE_PARSER_STATS, nmeaMessage, sizeof (nmeaMessage),
514
513
parserStats); // textID, buffer, sizeOfBuffer, text
515
- logFile->sync (); // Sync any partially written data
514
+ logFile->sync (); // Sync any partially written data
516
515
logFile->println (nmeaMessage);
517
516
logFile->sync ();
518
517
@@ -643,15 +642,16 @@ void checkGNSSArrayDefaults()
643
642
defaultsApplied = true ;
644
643
645
644
// Reset Base rates to defaults
646
- GNSS_ZED * zed = (GNSS_ZED *)gnss;
645
+ GNSS_ZED *zed = (GNSS_ZED *)gnss;
647
646
int firstRTCMRecord = zed->getMessageNumberByName (" RTCM_1005" );
648
647
for (int x = 0 ; x < MAX_UBX_MSG_RTCM; x++)
649
648
settings.ubxMessageRatesBase [x] = ubxMessages[firstRTCMRecord + x].msgDefaultRate ;
650
649
}
651
650
}
652
651
#else
653
- if (false )
654
- {}
652
+ if (false )
653
+ {
654
+ }
655
655
#endif // COMPILE_ZED
656
656
657
657
#ifdef COMPILE_UM980
@@ -836,9 +836,8 @@ void checkGNSSArrayDefaults()
836
836
for (int x = 0 ; x < MAX_LG290P_PQTM_MSG; x++)
837
837
settings.lg290pMessageRatesPQTM [x] = lgMessagesPQTM[x].msgDefaultRate ;
838
838
}
839
-
840
839
}
841
- #endif // COMPILE_LG290P
840
+ #endif // COMPILE_LG290P
842
841
843
842
// If defaults have been applied, override antennaPhaseCenter_mm with default
844
843
// (This was in beginSystemState - for the Torch / UM980 only. Weird...)
@@ -864,7 +863,7 @@ void checkGNSSArrayDefaults()
864
863
}
865
864
else if (present.gnss_lg290p )
866
865
{
867
- // settings.minCNO = 10; // Not yet supported
866
+ // settings.minCNO = 10; // Not yet supported
868
867
settings.surveyInStartingAccuracy = 2.0 ; // Default 2m
869
868
settings.measurementRateMs = 500 ; // Default 2Hz.
870
869
}
0 commit comments