|
24 | 24 | Text menu interactions |
25 | 25 |
|
26 | 26 | Main Menu (Display MAC address / broadcast name): |
27 | | - (Done) GNSS - Configure measurement rate, enable/disable common NMEA sentences, RAWX, SBAS |
28 | | - (Done) Log - Log to SD |
| 27 | + (Done) GNSS - Configure measurement rate, SBAS |
| 28 | + (Done) Log - Control messages logged to SD |
| 29 | + (Done) Broadcast - Control messages sent over BT SPP |
29 | 30 | (Done) Base - Enter fixed coordinates, survey-in settings, WiFi/Caster settings, |
30 | 31 | (Done) Ports - Configure Radio and Data port baud rates |
31 | 32 | (Done) Test menu |
32 | 33 | (Done) Firmware upgrade menu |
33 | 34 | Enable various debug outputs sent over BT |
34 | 35 |
|
35 | | - Test file date/time updates |
36 | | - Test firmware loading |
37 | 36 | Add blinking log file icon |
38 | 37 | */ |
39 | 38 |
|
@@ -347,13 +346,18 @@ void updateLogs() |
347 | 346 |
|
348 | 347 | int bytesWritten = ubxFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card |
349 | 348 |
|
| 349 | + if (settings.frequentFileAccessTimestamps == true) |
| 350 | + updateDataFileAccess(&ubxFile); // Update the file access time & date |
| 351 | + |
350 | 352 | //Force sync every 1000ms |
351 | 353 | if (millis() - lastUBXLogSyncTime > 1000) |
352 | 354 | { |
353 | 355 | lastUBXLogSyncTime = millis(); |
354 | 356 | digitalWrite(baseStatusLED, !digitalRead(baseStatusLED)); //Blink LED to indicate logging activity |
355 | 357 | ubxFile.sync(); |
356 | 358 | digitalWrite(baseStatusLED, !digitalRead(baseStatusLED)); //Return LED to previous state |
| 359 | + |
| 360 | + updateDataFileAccess(&ubxFile); // Update the file access time & date |
357 | 361 | } |
358 | 362 |
|
359 | 363 | xSemaphoreGive(xFATSemaphore); |
@@ -393,14 +397,16 @@ void updateRTC() |
393 | 397 | { |
394 | 398 | if (i2cGNSS.getConfirmedDate() == true && i2cGNSS.getConfirmedTime() == true) |
395 | 399 | { |
396 | | - //For the ESP32 SD library, the date/time stamp of files is set using the internal system time |
| 400 | + //Set the internal system time |
397 | 401 | //This is normally set with WiFi NTP but we will rarely have WiFi |
398 | 402 | rtc.setTime(i2cGNSS.getSecond(), i2cGNSS.getMinute(), i2cGNSS.getHour(), i2cGNSS.getDay(), i2cGNSS.getMonth(), i2cGNSS.getYear()); // 17th Jan 2021 15:24:30 |
399 | 403 |
|
400 | 404 | online.rtc = true; |
401 | 405 |
|
402 | 406 | Serial.print(F("System time set to: ")); |
403 | 407 | Serial.println(rtc.getTime("%B %d %Y %H:%M:%S")); //From ESP32Time library example |
| 408 | + |
| 409 | + recordSystemSettingsToFile(); //This will re-record the setting file with current date/time. |
404 | 410 | } |
405 | 411 | } |
406 | 412 | } |
|
0 commit comments