60
60
// the minor firmware version
61
61
#define RTK_IDENTIFIER (FIRMWARE_VERSION_MAJOR * 0x10 + FIRMWARE_VERSION_MINOR)
62
62
63
+ #ifdef COMPILE_ETHERNET
64
+ #include < Ethernet.h> // http://librarymanager/All#Arduino_Ethernet
65
+ #include " SparkFun_WebServer_ESP32_W5500.h" // http://librarymanager/All#SparkFun_WebServer_ESP32_W5500 v1.5.5
66
+ #endif // COMPILE_ETHERNET
67
+
68
+ #ifdef COMPILE_WIFI
69
+ #include " ESP32OTAPull.h" // http://librarymanager/All#ESP-OTA-Pull Used for getting
70
+ #include " esp_wifi.h" // Needed for esp_wifi_set_protocol()
71
+ #include < DNSServer.h> // Built-in.
72
+ #include < ESPmDNS.h> // Built-in.
73
+ #include < HTTPClient.h> // Built-in. Needed for ThingStream API for ZTP
74
+ #include < PubSubClient.h> // http://librarymanager/All#PubSubClient_MQTT_Lightweight by Nick O'Leary v2.8.0 Used for MQTT obtaining of keys
75
+ #include < WiFi.h> // Built-in.
76
+ #include < WiFiClientSecure.h> // Built-in.
77
+ #include < WiFiMulti.h> // Built-in.
78
+ #endif // COMPILE_WIFI
79
+
80
+ #if COMPILE_NETWORK
81
+ #include < SSLClientESP32.h> // http://librarymanager/All#SSLClientESP32
82
+ #include " X509_Certificate_Bundle.h" // Root certificates
83
+ #endif // COMPILE_NETWORK
84
+
63
85
#include " settings.h"
64
86
65
87
#define MAX_CPU_CORES 2
@@ -200,10 +222,6 @@ char logFileName[sizeof("SFE_Reference_Station_230101_120101.ubx_plusExtraSpace"
200
222
// Over-the-Air (OTA) update support
201
223
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
202
224
203
- #if COMPILE_NETWORK
204
- #include < SSLClientESP32.h> // http://librarymanager/All#SSLClientESP32
205
- #include " X509_Certificate_Bundle.h" // Root certificates
206
- #endif // COMPILE_NETWORK
207
225
#include < ArduinoJson.h> // http://librarymanager/All#Arduino_JSON_messagepack v6.19.4
208
226
209
227
#include " esp_ota_ops.h" // Needed for partition counting and updateFromSD
@@ -216,7 +234,6 @@ char logFileName[sizeof("SFE_Reference_Station_230101_120101.ubx_plusExtraSpace"
216
234
}
217
235
218
236
#ifdef COMPILE_WIFI
219
- #include " ESP32OTAPull.h" // http://librarymanager/All#ESP-OTA-Pull Used for getting
220
237
221
238
#define WIFI_STOP () \
222
239
{ \
@@ -237,19 +254,6 @@ unsigned int binBytesSent = 0; // Tracks firmware bytes sent over WiFi O
237
254
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
238
255
// Connection settings to NTRIP Caster
239
256
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
240
- #ifdef COMPILE_WIFI
241
- #include < ESPmDNS.h> // Built-in.
242
- #include < HTTPClient.h> // Built-in. Needed for ThingStream API for ZTP
243
- #include < PubSubClient.h> // http://librarymanager/All#PubSubClient_MQTT_Lightweight by Nick O'Leary v2.8.0 Used for MQTT obtaining of keys
244
- #include < WiFi.h> // Built-in.
245
- #include < WiFiClientSecure.h> // Built-in.
246
- #include < WiFiMulti.h> // Built-in.
247
- #include < DNSServer.h> // Built-in.
248
-
249
- #include " esp_wifi.h" // Needed for esp_wifi_set_protocol()
250
-
251
- #endif // COMPILE_WIFI
252
-
253
257
#include " base64.h" // Built-in. Needed for NTRIP Client credential encoding.
254
258
255
259
bool enableRCFirmware = false ; // Goes true from AP config page
@@ -574,7 +578,6 @@ const uint8_t ESPNOW_MAX_PEERS = 5; // Maximum of 5 rovers
574
578
// Ethernet
575
579
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
576
580
#ifdef COMPILE_ETHERNET
577
- #include < Ethernet.h> // http://librarymanager/All#Arduino_Ethernet
578
581
IPAddress ethernetIPAddress;
579
582
IPAddress ethernetDNS;
580
583
IPAddress ethernetGateway;
@@ -591,15 +594,11 @@ class derivedEthernetUDP : public EthernetUDP
591
594
volatile struct timeval ethernetNtpTv; // This will hold the time the Ethernet NTP packet arrived
592
595
bool ntpLogIncreasing;
593
596
594
- #include " SparkFun_WebServer_ESP32_W5500.h" // http://librarymanager/All#SparkFun_WebServer_ESP32_W5500 v1.5.5
595
597
#endif // COMPILE_ETHERNET
596
598
597
599
unsigned long lastEthernetCheck = 0 ; // Prevents cable checking from continually happening
598
600
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
599
601
600
- #include " NetworkClient.h" // Supports both WiFiClient and EthernetClient
601
- #include " NetworkUDP.h" // Supports both WiFiUdp and EthernetUdp
602
-
603
602
// Global variables
604
603
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
605
604
#define lbandMACAddress btMACAddress
0 commit comments