Skip to content

Commit c1b34f0

Browse files
committed
Fix typos
1 parent c9ebdb3 commit c1b34f0

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

Firmware/RTK_Surveyor/NVM.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void recordSystemSettingsToFile(File * settingsFile)
293293
settingsFile->printf("%s=%d\r\n", "uartReceiveBufferSize", settings.uartReceiveBufferSize);
294294
settingsFile->printf("%s=%d\r\n", "gnssHandlerBufferSize", settings.gnssHandlerBufferSize);
295295
settingsFile->printf("%s=%d\r\n", "enablePrintBufferOverrun", settings.enablePrintBufferOverrun);
296-
settingsFile->printf("%s=%d\r\n", "enablePrintSDBuffers", settings.enablePrintBufferOverrun);
296+
settingsFile->printf("%s=%d\r\n", "enablePrintSDBuffers", settings.enablePrintSDBuffers);
297297

298298
//Record constellation settings
299299
for (int x = 0 ; x < MAX_CONSTELLATIONS ; x++)

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ float battChangeRate = 0.0;
273273

274274
char platformPrefix[55] = "Surveyor"; //Sets the prefix for broadcast names
275275

276+
#include <driver/uart.h> //Required for uart_set_rx_full_threshold() on cores <v2.0.5
276277
HardwareSerial serialGNSS(2); //TX on 17, RX on 16
277278

278279
#define SERIAL_SIZE_TX 512
@@ -295,6 +296,7 @@ volatile bool uart2pinned = false; //This variable is touched by core 0 but chec
295296

296297
volatile static int combinedSpaceRemaining = 0; //Overrun indicator
297298
volatile static long fileSize = 0; //Updated with each write
299+
int bufferOverruns = 0; //Running count of possible data losses since power-on
298300

299301
bool zedUartPassed = false; //Goes true during testing if ESP can communicate with ZED over UART
300302
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -437,7 +439,6 @@ uint32_t rtcmLastReceived = 0;
437439

438440
uint32_t maxSurveyInWait_s = 60L * 15L; //Re-start survey-in after X seconds
439441

440-
uint32_t totalWriteTime = 0; //Used to calculate overall write speed using SdFat library
441442

442443
uint16_t svinObservationTime = 0; //Use globals so we don't have to request these values multiple times (slow response)
443444
float svinMeanAccuracy = 0;
@@ -675,37 +676,6 @@ void updateLogs()
675676

676677
if (online.logging == true)
677678
{
678-
//Force file sync every 60s
679-
if (millis() - lastUBXLogSyncTime > 60000)
680-
{
681-
if (xSemaphoreTake(sdCardSemaphore, fatSemaphore_shortWait_ms) == pdPASS)
682-
{
683-
markSemaphore(FUNCTION_SYNC);
684-
685-
if (productVariant == RTK_SURVEYOR)
686-
digitalWrite(pin_baseStatusLED, !digitalRead(pin_baseStatusLED)); //Blink LED to indicate logging activity
687-
688-
ubxFile->sync();
689-
690-
if (productVariant == RTK_SURVEYOR)
691-
digitalWrite(pin_baseStatusLED, !digitalRead(pin_baseStatusLED)); //Return LED to previous state
692-
693-
updateDataFileAccess(ubxFile); // Update the file access time & date
694-
695-
lastUBXLogSyncTime = millis();
696-
xSemaphoreGive(sdCardSemaphore);
697-
} //End sdCardSemaphore
698-
else
699-
{
700-
char semaphoreHolder[50];
701-
getSemaphoreFunction(semaphoreHolder);
702-
703-
//This is OK because in the interim more data will be written to the log
704-
//and the log file will eventually be synced by the next call in loop
705-
log_d("sdCardSemaphore failed to yield for sync, held by %s, RTK_Surveyor.ino line %d", semaphoreHolder, __LINE__);
706-
}
707-
}
708-
709679
//Record any pending trigger events
710680
if (newEventToRecord == true)
711681
{
@@ -763,8 +733,6 @@ void updateLogs()
763733
Serial.println();
764734
}
765735

766-
totalWriteTime = 0; //Reset write time every 5s
767-
768736
if (fileSize > lastLogSize)
769737
{
770738
lastLogSize = fileSize;

0 commit comments

Comments
 (0)