Skip to content

Commit f9e717b

Browse files
committed
Whitespace changes
1 parent 63256cc commit f9e717b

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

Firmware/RTK_Everywhere/menuMessages.ino

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void menuLogSelection()
4545
else
4646
printUnknown(incoming);
4747
}
48-
clearBuffer(); // Empty buffer of any newline chars
48+
clearBuffer(); // Empty buffer of any newline chars
4949
}
5050
}
5151

@@ -268,7 +268,7 @@ void menuMessagesBaseRTCM()
268268
// Based on GPS data/time, create a log file in the format SFE_Everywhere_YYMMDD_HHMMSS.ubx
269269
bool beginLogging()
270270
{
271-
return(beginLogging(nullptr));
271+
return (beginLogging(nullptr));
272272
}
273273

274274
bool beginLogging(const char *customFileName)
@@ -308,18 +308,17 @@ bool beginLogging(const char *customFileName)
308308

309309
if (strlen(logFileName) == 0)
310310
{
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
312312
char fileExtension[4] = "ubx";
313-
if(present.gnss_zedf9p == false)
313+
if (present.gnss_zedf9p == false)
314314
strncpy(fileExtension, "txt", sizeof(fileExtension));
315315

316316
snprintf(logFileName, sizeof(logFileName), "/%s_%02d%02d%02d_%02d%02d%02d.%s", // SdFat library
317317
platformFilePrefix, rtc.getYear() - 2000, rtc.getMonth() + 1,
318318
rtc.getDay(), // ESP32Time returns month:0-11
319319
rtc.getHour(true), rtc.getMinute(),
320320
rtc.getSecond(), // ESP32Time getHour(true) returns hour:0-23
321-
fileExtension
322-
);
321+
fileExtension);
323322
}
324323
}
325324
else
@@ -335,7 +334,7 @@ bool beginLogging(const char *customFileName)
335334
if (!logFile)
336335
{
337336
systemPrintln("Failed to allocate logFile!");
338-
return(false);
337+
return (false);
339338
}
340339
}
341340

@@ -352,11 +351,11 @@ bool beginLogging(const char *customFileName)
352351
systemPrintf("Failed to create GNSS log file: %s\r\n", logFileName);
353352
online.logging = false;
354353
xSemaphoreGive(sdCardSemaphore);
355-
return(false);
354+
return (false);
356355
}
357356

358357
logFileSize = 0;
359-
lastLogSize = 0; // Reset counter - used for displaying active logging icon
358+
lastLogSize = 0; // Reset counter - used for displaying active logging icon
360359
lastFileReport = millis(); // Fake last file report to avoid an immediate timeout
361360

362361
bufferOverruns = 0; // Reset counter
@@ -371,9 +370,9 @@ bool beginLogging(const char *customFileName)
371370
if ((24 * 60 * 2) % settings.maxLogLength_minutes == 0)
372371
{
373372
// 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);
377376
unsigned long maxLogLength_ms = (unsigned long)settings.maxLogLength_minutes * 60 * 1000;
378377
unsigned long millisFromPreviousLog = hoursAsMillis % maxLogLength_ms;
379378
unsigned long millisToNextLog = maxLogLength_ms - millisFromPreviousLog;
@@ -480,7 +479,7 @@ bool beginLogging(const char *customFileName)
480479
// A retry will happen during the next loop, the log will eventually be opened
481480
log_d("Failed to get file system lock to create GNSS log file");
482481
online.logging = false;
483-
return(false);
482+
return (false);
484483
}
485484

486485
systemPrintf("Log file name: %s\r\n", logFileName);
@@ -512,7 +511,7 @@ void endLogging(bool gotSemaphore, bool releaseSemaphore)
512511
char nmeaMessage[82]; // Max NMEA sentence length is 82
513512
createNMEASentence(CUSTOM_NMEA_TYPE_PARSER_STATS, nmeaMessage, sizeof(nmeaMessage),
514513
parserStats); // textID, buffer, sizeOfBuffer, text
515-
logFile->sync(); // Sync any partially written data
514+
logFile->sync(); // Sync any partially written data
516515
logFile->println(nmeaMessage);
517516
logFile->sync();
518517

@@ -643,15 +642,16 @@ void checkGNSSArrayDefaults()
643642
defaultsApplied = true;
644643

645644
// Reset Base rates to defaults
646-
GNSS_ZED * zed = (GNSS_ZED *)gnss;
645+
GNSS_ZED *zed = (GNSS_ZED *)gnss;
647646
int firstRTCMRecord = zed->getMessageNumberByName("RTCM_1005");
648647
for (int x = 0; x < MAX_UBX_MSG_RTCM; x++)
649648
settings.ubxMessageRatesBase[x] = ubxMessages[firstRTCMRecord + x].msgDefaultRate;
650649
}
651650
}
652651
#else
653-
if(false)
654-
{}
652+
if (false)
653+
{
654+
}
655655
#endif // COMPILE_ZED
656656

657657
#ifdef COMPILE_UM980
@@ -836,9 +836,8 @@ void checkGNSSArrayDefaults()
836836
for (int x = 0; x < MAX_LG290P_PQTM_MSG; x++)
837837
settings.lg290pMessageRatesPQTM[x] = lgMessagesPQTM[x].msgDefaultRate;
838838
}
839-
840839
}
841-
#endif // COMPILE_LG290P
840+
#endif // COMPILE_LG290P
842841

843842
// If defaults have been applied, override antennaPhaseCenter_mm with default
844843
// (This was in beginSystemState - for the Torch / UM980 only. Weird...)
@@ -864,7 +863,7 @@ void checkGNSSArrayDefaults()
864863
}
865864
else if (present.gnss_lg290p)
866865
{
867-
//settings.minCNO = 10; // Not yet supported
866+
// settings.minCNO = 10; // Not yet supported
868867
settings.surveyInStartingAccuracy = 2.0; // Default 2m
869868
settings.measurementRateMs = 500; // Default 2Hz.
870869
}

0 commit comments

Comments
 (0)