|
34 | 34 | #define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup) |
35 | 35 | //#define FACTORY_RESET_AT_POWER_ON //Uncomment this line to perform a factory reset at every power-on. Needs ENABLE_DEVELOPER |
36 | 36 | //#define ERASE_PROFILES_AT_POWER_ON //Uncomment this line to erase _all_ profiles at power-on. Needs FACTORY_RESET_ON_POWER_ON |
| 37 | +#define REF_STN_GNSS_DEBUG //Uncomment this line to output GNSS library debug messages on serialGNSS. Ref STn only. Needs ENABLE_DEVELOPER |
37 | 38 |
|
38 | 39 | //Define the RTK board identifier: |
39 | 40 | // This is an int which is unique to this variant of the RTK Surveyor hardware which allows us |
@@ -307,6 +308,7 @@ volatile bool uart2pinned = false; //This variable is touched by core 0 but chec |
307 | 308 |
|
308 | 309 | volatile static int combinedSpaceRemaining = 0; //Overrun indicator |
309 | 310 | volatile static long fileSize = 0; //Updated with each write |
| 311 | +volatile static long filePosition = 0; //Updated with each write |
310 | 312 | int bufferOverruns = 0; //Running count of possible data losses since power-on |
311 | 313 |
|
312 | 314 | bool zedUartPassed = false; //Goes true during testing if ESP can communicate with ZED over UART |
@@ -452,7 +454,8 @@ uint8_t loggingIconDisplayed = 0; //Increases every 500ms while logging |
452 | 454 | uint8_t espnowIconDisplayed = 0; //Increases every 500ms while transmitting |
453 | 455 |
|
454 | 456 | uint64_t lastLogSize = 0; |
455 | | -bool logIncreasing = false; //Goes true when log file is greater than lastLogSize |
| 457 | +uint64_t lastLogPosition = 0; |
| 458 | +bool logIncreasing = false; //Goes true when log file is greater than lastLogSize or logPosition changes |
456 | 459 | bool reuseLastLog = false; //Goes true if we have a reset due to software (rather than POR) |
457 | 460 |
|
458 | 461 | uint16_t rtcmPacketsSent = 0; //Used to count RTCM packets sent via processRTCM() |
@@ -841,6 +844,11 @@ void updateLogs() |
841 | 844 | lastLogSize = fileSize; |
842 | 845 | logIncreasing = true; |
843 | 846 | } |
| 847 | + else if (filePosition != lastLogPosition) |
| 848 | + { |
| 849 | + lastLogPosition = filePosition; |
| 850 | + logIncreasing = true; |
| 851 | + } |
844 | 852 | else |
845 | 853 | { |
846 | 854 | log_d("No increase in file size"); |
|
0 commit comments