21
21
22
22
// To reduce compile times, various parts of the firmware can be disabled/removed if they are not
23
23
// needed during development
24
- #define COMPILE_BT // Comment out to remove Bluetooth functionality
25
- #define COMPILE_WIFI // Comment out to remove WiFi functionality
26
- #define COMPILE_ETHERNET // Comment out to remove Ethernet (W5500) support
24
+ // #define COMPILE_BT // Comment out to remove Bluetooth functionality
25
+ // #define COMPILE_WIFI // Comment out to remove WiFi functionality
26
+ // #define COMPILE_ETHERNET // Comment out to remove Ethernet (W5500) support
27
27
28
28
#ifdef COMPILE_WIFI
29
29
#define COMPILE_AP // Requires WiFi. Comment out to remove Access Point functionality
81
81
#include < ESPmDNS.h> // Built-in.
82
82
#include < HTTPClient.h> // Built-in. Needed for ThingStream API for ZTP
83
83
#include < MqttClient.h> // http://librarymanager/All#ArduinoMqttClient by Arduino v0.1.8
84
- #include < WiFi.h> // Built-in.
84
+ #include < WiFi.h> // Built-in.
85
85
#include < WiFiClientSecure.h> // Built-in.
86
86
#include < WiFiMulti.h> // Built-in.
87
87
#endif // COMPILE_WIFI
@@ -276,9 +276,11 @@ char logFileName[sizeof("SFE_Reference_Station_230101_120101.ubx_plusExtraSpace"
276
276
// 1 2 3 4 5 6 7 8 9 0 1 2
277
277
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
278
278
#define OTA_FIRMWARE_JSON_URL \
279
- " https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Everywhere_Firmware_Binaries/main/RTK-Everywhere-Firmware.json"
279
+ " https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Everywhere_Firmware_Binaries/main/" \
280
+ " RTK-Everywhere-Firmware.json"
280
281
#define OTA_RC_FIRMWARE_JSON_URL \
281
- " https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Everywhere_Firmware_Binaries/main/RTK-Everywhere-RC-Firmware.json"
282
+ " https://raw.githubusercontent.com/sparkfun/SparkFun_RTK_Everywhere_Firmware_Binaries/main/" \
283
+ " RTK-Everywhere-RC-Firmware.json"
282
284
char otaFirmwareJsonUrl[OTA_FIRMWARE_JSON_URL_LENGTH];
283
285
char otaRcFirmwareJsonUrl[OTA_FIRMWARE_JSON_URL_LENGTH];
284
286
@@ -303,7 +305,7 @@ int wifiOriginalMaxConnectionAttempts = wifiMaxConnectionAttempts; // Modified d
303
305
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
304
306
#include < SparkFun_u-blox_GNSS_v3.h> // http://librarymanager/All#SparkFun_u-blox_GNSS_v3 v3.0.5
305
307
306
- char neoFirmwareVersion[20 ]; // Output to system status menu.
308
+ char neoFirmwareVersion[20 ]; // Output to system status menu.
307
309
308
310
// Use Michael's lock/unlock methods to prevent the GNSS UART task from calling checkUblox during a sendCommand and
309
311
// waitForResponse. Also prevents pushRawData from being called.
@@ -386,9 +388,9 @@ int64_t ARPECEFY;
386
388
int64_t ARPECEFZ;
387
389
uint16_t ARPECEFH;
388
390
389
- const byte haeNumberOfDecimals = 8 ; // Used for printing and transmitting lat/lon
390
- bool lBandForceGetKeys; // Used to allow key update from display
391
- unsigned long rtcmLastPacketReceived; // Time stamp of RTCM coming in (from BT, NTRIP, etc)
391
+ const byte haeNumberOfDecimals = 8 ; // Used for printing and transmitting lat/lon
392
+ bool lBandForceGetKeys; // Used to allow key update from display
393
+ unsigned long rtcmLastPacketReceived; // Time stamp of RTCM coming in (from BT, NTRIP, etc)
392
394
// Monitors the last time we received RTCM. Proctors PMP vs RTCM prioritization.
393
395
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
394
396
@@ -671,14 +673,15 @@ uint64_t lastLogSize;
671
673
bool logIncreasing; // Goes true when log file is greater than lastLogSize or logPosition changes
672
674
bool reuseLastLog; // Goes true if we have a reset due to software (rather than POR)
673
675
674
- uint16_t rtcmPacketsSent; // Used to count RTCM packets sent via processRTCM()
675
- uint32_t rtcmLastPacketSent; // Time stamp of RTCM going out (to NTRIP Server, ESP-NOW, etc)
676
+ uint16_t rtcmPacketsSent; // Used to count RTCM packets sent via processRTCM()
677
+ uint32_t rtcmLastPacketSent; // Time stamp of RTCM going out (to NTRIP Server, ESP-NOW, etc)
676
678
677
679
uint32_t maxSurveyInWait_s = 60L * 15L ; // Re-start survey-in after X seconds
678
680
679
681
uint32_t lastSetupMenuChange; // Limits how much time is spent in the setup menu
680
682
uint32_t lastTestMenuChange; // Avoids exiting the test menu for at least 1 second
681
- uint8_t setupSelectedButton = 0 ; // In Display Setup, start displaying at this button. This is the selected (highlighted) button.
683
+ uint8_t setupSelectedButton =
684
+ 0 ; // In Display Setup, start displaying at this button. This is the selected (highlighted) button.
682
685
std::vector<setupButton> setupButtons; // A vector (linked list) of the setup 'butttons'
683
686
684
687
bool firstRoverStart; // Used to detect if the user is toggling the power button at POR to enter the test menu
@@ -739,10 +742,10 @@ unsigned long um980BaseStartTimer; // Tracks how long the base averaging mode ha
739
742
740
743
RtkMode_t rtkMode; // Mode of operation
741
744
742
- unsigned long beepLengthMs; // Number of ms to make noise
745
+ unsigned long beepLengthMs; // Number of ms to make noise
743
746
unsigned long beepQuietLengthMs; // Number of ms to make reset between multiple beeps
744
- unsigned long beepNextEventMs; // Time at which to move the beeper to the next state
745
- unsigned long beepCount; // Number of beeps to do
747
+ unsigned long beepNextEventMs; // Time at which to move the beeper to the next state
748
+ unsigned long beepCount; // Number of beeps to do
746
749
747
750
unsigned long lastMqttToPpl;
748
751
unsigned long lastGnssToPpl;
@@ -812,7 +815,7 @@ volatile bool deadManWalking;
812
815
settings.enablePrintRtcSync = true ; \
813
816
settings.enablePrintBufferOverrun = true ; \
814
817
settings.enablePrintSDBuffers = true ; \
815
- settings.periodicDisplay = (PeriodicDisplay_t)- 1 ; \
818
+ settings.periodicDisplay = (PeriodicDisplay_t) - 1 ; \
816
819
settings.enablePrintEthernetDiag = true ; \
817
820
settings.debugWifiState = true ; \
818
821
settings.debugNetworkLayer = true ; \
@@ -821,9 +824,9 @@ volatile bool deadManWalking;
821
824
settings.debugNtripClientState = true ; \
822
825
settings.debugNtripServerRtcm = true ; \
823
826
settings.debugNtripServerState = true ; \
824
- settings.debugPvtClient = true ; \
825
- settings.debugPvtServer = true ; \
826
- settings.debugPvtUdpServer = true ; \
827
+ settings.debugTcpClient = true ; \
828
+ settings.debugTcpServer = true ; \
829
+ settings.debugUdpServer = true ; \
827
830
settings.printBootTimes = true ; \
828
831
}
829
832
@@ -1394,9 +1397,9 @@ void rtcUpdate()
1394
1397
{
1395
1398
systemPrintln (" No GNSS date/time available for system RTC." );
1396
1399
} // End timeValid
1397
- } // End lastRTCAttempt
1398
- } // End online.gnss
1399
- } // End online.rtc
1400
+ } // End lastRTCAttempt
1401
+ } // End online.gnss
1402
+ } // End online.rtc
1400
1403
1401
1404
// Print TP time sync information here. Trying to do it in the ISR would be a bad idea...
1402
1405
if (settings.enablePrintRtcSync == true )
@@ -1444,7 +1447,7 @@ void updateRadio()
1444
1447
1445
1448
if (!inMainMenu)
1446
1449
{
1447
- if (settings.debugEspNow == true )
1450
+ if (settings.debugEspNow == true )
1448
1451
systemPrintf (" ESPNOW transmitted %d RTCM bytes\r\n " , espnowBytesSent + espnowOutgoingSpot);
1449
1452
}
1450
1453
espnowBytesSent = 0 ;
0 commit comments