From 8b60d71b2bf721028d95f5ce904d99b4027a4355 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 05:38:31 -1000 Subject: [PATCH 1/6] Build with COMPILE_NTRIP_SERVER commented out --- Firmware/RTK_Everywhere/Developer.ino | 42 +++++++++++----------- Firmware/RTK_Everywhere/NtripServer.ino | 4 +-- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 9 ++--- Firmware/RTK_Everywhere/check.sh | 5 +++ 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index 75ce977f5..7459fd4ad 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -71,19 +71,6 @@ void ntripClientStop(bool clientAllocated) {online.ntripClient = false;} void ntripClientUpdate() {} void ntripClientValidateTables() {} -//---------------------------------------- -// NTRIP server -//---------------------------------------- - -void ntripServerPrintStatus(int serverIndex) {systemPrintf("**NTRIP Server %d not compiled**\r\n", serverIndex);} -void ntripServerProcessRTCM(int serverIndex, uint8_t incoming) {} -void ntripServerStop(int serverIndex, bool shutdown) {online.ntripServer[serverIndex] = false;} -void ntripServerUpdate() {} -void ntripServerValidateTables() {} -bool ntripServerIsCasting(int serverIndex) { - return (false); -} - //---------------------------------------- // TCP client //---------------------------------------- @@ -131,6 +118,18 @@ void otaVerifyTables() {} #endif // COMPILE_OTA_AUTO +//---------------------------------------- +// HTTP Client +//---------------------------------------- + +#ifndef COMPILE_HTTP_CLIENT + +void httpClientPrintStatus() {} +void httpClientUpdate() {} +void httpClientValidateTables() {} + +#endif // COMPILE_HTTP_CLIENT + //---------------------------------------- // MQTT Client //---------------------------------------- @@ -147,16 +146,17 @@ void mqttClientValidateTables() {} #endif // COMPILE_MQTT_CLIENT //---------------------------------------- -// HTTP Client +// NTRIP server //---------------------------------------- -#ifndef COMPILE_HTTP_CLIENT - -void httpClientPrintStatus() {} -void httpClientUpdate() {} -void httpClientValidateTables() {} - -#endif // COMPILE_HTTP_CLIENT +#ifndef COMPILE_NTRIP_SERVER +bool ntripServerIsCasting(int serverIndex) {return false;} +void ntripServerPrintStatus(int serverIndex) {systemPrintf("**NTRIP Server %d not compiled**\r\n", serverIndex);} +void ntripServerProcessRTCM(int serverIndex, uint8_t incoming) {} +void ntripServerStop(int serverIndex, bool shutdown) {online.ntripServer[serverIndex] = false;} +void ntripServerUpdate() {} +void ntripServerValidateTables() {} +#endif // COMPILE_NTRIP_SERVER //---------------------------------------- // Web Server diff --git a/Firmware/RTK_Everywhere/NtripServer.ino b/Firmware/RTK_Everywhere/NtripServer.ino index 1353783ac..0d89974e1 100644 --- a/Firmware/RTK_Everywhere/NtripServer.ino +++ b/Firmware/RTK_Everywhere/NtripServer.ino @@ -122,7 +122,7 @@ NtripServer.ino =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#ifdef COMPILE_NETWORK +#ifdef COMPILE_NTRIP_SERVER //---------------------------------------- // Constants @@ -877,4 +877,4 @@ void ntripServerValidateTables() reportFatalError("Fix ntripServerStateNameEntries to match NTRIPServerState"); } -#endif // COMPILE_NETWORK +#endif // COMPILE_NTRIP_SERVER diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index 20cdf21b7..47643b3d9 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -113,9 +113,10 @@ #if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR) #define COMPILE_NETWORK -#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality -#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update -#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality +#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality +#define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality +#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update +#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality #endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR // Always define ENABLE_DEVELOPER to enable its use in conditional statements @@ -1592,7 +1593,7 @@ bool logLengthExceeded() // Limit individual files to maxLogLength_minutes if (nextLogTime_ms == 0) // Keep logging if nextLogTime_ms has not been set return false; - + // Note: this will roll over every 49.71 days... // Solution: https://stackoverflow.com/a/3097744 - see issue #742 return (!((long)(nextLogTime_ms - millis()) > 0)); diff --git a/Firmware/RTK_Everywhere/check.sh b/Firmware/RTK_Everywhere/check.sh index 8d22f49a5..095697eac 100755 --- a/Firmware/RTK_Everywhere/check.sh +++ b/Firmware/RTK_Everywhere/check.sh @@ -67,6 +67,11 @@ sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.i make git reset --hard --quiet HEAD +# NTRIP Server +sed -i 's|#define COMPILE_NTRIP_SERVER|//#define COMPILE_NTRIP_SERVER|' RTK_Everywhere.ino +make +git reset --hard --quiet HEAD + # UM980 sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino make From f94258c17e07b0c979efe9497eb0895fa8c76220 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 06:47:18 -1000 Subject: [PATCH 2/6] Build with COMPILE_NTRIP_CLIENT commented out --- Firmware/RTK_Everywhere/Developer.ino | 21 +++++----- Firmware/RTK_Everywhere/GNSS.ino | 46 +++++----------------- Firmware/RTK_Everywhere/NtripClient.ino | 32 ++++++++++++++- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 1 + Firmware/RTK_Everywhere/check.sh | 5 +++ 5 files changed, 58 insertions(+), 47 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index 7459fd4ad..fd3cee6d7 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -62,15 +62,6 @@ void networkUserRemove(NETCONSUMER_t consumer, const char * fileName, uint32_t l void networkValidateIndex(NetIndex_t index) {} void networkVerifyTables() {} -//---------------------------------------- -// NTRIP client -//---------------------------------------- - -void ntripClientPrintStatus() {systemPrintln("**NTRIP Client not compiled**");} -void ntripClientStop(bool clientAllocated) {online.ntripClient = false;} -void ntripClientUpdate() {} -void ntripClientValidateTables() {} - //---------------------------------------- // TCP client //---------------------------------------- @@ -145,6 +136,18 @@ void mqttClientValidateTables() {} #endif // COMPILE_MQTT_CLIENT +//---------------------------------------- +// NTRIP client +//---------------------------------------- + +#ifndef COMPILE_NTRIP_CLIENT +void ntripClientPrintStatus() {systemPrintln("**NTRIP Client not compiled**");} +void ntripClientPushGGA(const char * ggaString) {} +void ntripClientStop(bool clientAllocated) {online.ntripClient = false;} +void ntripClientUpdate() {} +void ntripClientValidateTables() {} +#endif // COMPILE_NTRIP_CLIENT + //---------------------------------------- // NTRIP server //---------------------------------------- diff --git a/Firmware/RTK_Everywhere/GNSS.ino b/Firmware/RTK_Everywhere/GNSS.ino index e7df01f21..2f3e361c1 100644 --- a/Firmware/RTK_Everywhere/GNSS.ino +++ b/Firmware/RTK_Everywhere/GNSS.ino @@ -4,14 +4,6 @@ GNSS.ino GNSS layer implementation ------------------------------------------------------------------------------*/ -extern int NTRIPCLIENT_MS_BETWEEN_GGA; - -#ifdef COMPILE_NETWORK -extern NetworkClient *ntripClient; -#endif // COMPILE_NETWORK - -extern unsigned long lastGGAPush; - //---------------------------------------- // Setup the general configuration of the GNSS // Not Rover or Base specific (ie, baud rates) @@ -92,38 +84,20 @@ static void pushGPGGA(char *ggaData) if (xSemaphoreTake(reentrant, 10 / portTICK_PERIOD_MS) == pdPASS) { - if (ggaData) - { - snprintf(storedGPGGA, sizeof(storedGPGGA), "%s", ggaData); - xSemaphoreGive(reentrant); - return; - } - -#ifdef COMPILE_NETWORK - // Wait until the client has been created - if (ntripClient != nullptr) + do { - // Provide the caster with our current position as needed - if (ntripClient->connected() && settings.ntripClient_TransmitGGA == true) + // Save the ggaData string + if (ggaData) { - if ((millis() - lastGGAPush) > NTRIPCLIENT_MS_BETWEEN_GGA) - { - lastGGAPush = millis(); - - if ((settings.debugNtripClientRtcm || PERIODIC_DISPLAY(PD_NTRIP_CLIENT_GGA)) && !inMainMenu) - { - PERIODIC_CLEAR(PD_NTRIP_CLIENT_GGA); - systemPrintf("NTRIP Client pushing GGA to server: %s", (const char *)storedGPGGA); - } - - // Push our current GGA sentence to caster - if (strlen(storedGPGGA) > 0) - ntripClient->write((const uint8_t *)storedGPGGA, strlen(storedGPGGA)); - } + snprintf(storedGPGGA, sizeof(storedGPGGA), "%s", ggaData); + break; } - } -#endif // COMPILE_NETWORK + // Verify that a GGA string has been saved + if (storedGPGGA[0]) + // Push our current GGA sentence to caster + ntripClientPushGGA(storedGPGGA); + } while (0); xSemaphoreGive(reentrant); } } diff --git a/Firmware/RTK_Everywhere/NtripClient.ino b/Firmware/RTK_Everywhere/NtripClient.ino index 0019f8614..7c4ff0a3d 100644 --- a/Firmware/RTK_Everywhere/NtripClient.ino +++ b/Firmware/RTK_Everywhere/NtripClient.ino @@ -117,7 +117,7 @@ NtripClient.ino =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#ifdef COMPILE_NETWORK +#ifdef COMPILE_NTRIP_CLIENT //---------------------------------------- // Constants @@ -494,6 +494,34 @@ void ntripClientPrintStatus() } } +//---------------------------------------- +// Push GGA string to the NTRIP caster +//---------------------------------------- +void ntripClientPushGGA(const char * ggaString) +{ + // Wait until the client has been created + if (ntripClient != nullptr) + { + // Provide the caster with our current position as needed + if (ntripClient->connected() && settings.ntripClient_TransmitGGA == true) + { + if ((millis() - lastGGAPush) > NTRIPCLIENT_MS_BETWEEN_GGA) + { + lastGGAPush = millis(); + + if ((settings.debugNtripClientRtcm || PERIODIC_DISPLAY(PD_NTRIP_CLIENT_GGA)) && !inMainMenu) + { + PERIODIC_CLEAR(PD_NTRIP_CLIENT_GGA); + systemPrintf("NTRIP Client pushing GGA to server: %s", ggaString); + } + + // Push the current GGA sentence to caster + ntripClient->write((const uint8_t *)ggaString, strlen(ggaString)); + } + } + } +} + //---------------------------------------- // Determine if NTRIP client data is available //---------------------------------------- @@ -972,4 +1000,4 @@ void ntripClientValidateTables() reportFatalError("Fix ntripClientStateNameEntries to match NTRIPClientState"); } -#endif // COMPILE_NETWORK +#endif // COMPILE_NTRIP_CLIENT diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index 47643b3d9..e47319121 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -114,6 +114,7 @@ #if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR) #define COMPILE_NETWORK #define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality +#define COMPILE_NTRIP_CLIENT // Comment out to remove NTRIP client functionality #define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality #define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update #define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality diff --git a/Firmware/RTK_Everywhere/check.sh b/Firmware/RTK_Everywhere/check.sh index 095697eac..aa650ad38 100755 --- a/Firmware/RTK_Everywhere/check.sh +++ b/Firmware/RTK_Everywhere/check.sh @@ -67,6 +67,11 @@ sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.i make git reset --hard --quiet HEAD +# NTRIP Client +sed -i 's|#define COMPILE_NTRIP_CLIENT|//#define COMPILE_NTRIP_CLIENT|' RTK_Everywhere.ino +make +git reset --hard --quiet HEAD + # NTRIP Server sed -i 's|#define COMPILE_NTRIP_SERVER|//#define COMPILE_NTRIP_SERVER|' RTK_Everywhere.ino make From 4c2a800d39fe5e17f06b86c1a1c6cd10216ad6b7 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 07:50:02 -1000 Subject: [PATCH 3/6] Build with COMPILE_TCP_CLIENT commented out --- Firmware/RTK_Everywhere/Developer.ino | 22 ++++++++++++---------- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 3 ++- Firmware/RTK_Everywhere/TcpClient.ino | 4 ++-- Firmware/RTK_Everywhere/check.sh | 5 +++++ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index fd3cee6d7..b8780500c 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -62,16 +62,6 @@ void networkUserRemove(NETCONSUMER_t consumer, const char * fileName, uint32_t l void networkValidateIndex(NetIndex_t index) {} void networkVerifyTables() {} -//---------------------------------------- -// TCP client -//---------------------------------------- - -void tcpClientDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} -int32_t tcpClientSendData(uint16_t dataHead) {return 0;} -void tcpClientUpdate() {} -void tcpClientValidateTables() {} -void tcpClientZeroTail() {} - //---------------------------------------- // TCP server //---------------------------------------- @@ -161,6 +151,18 @@ void ntripServerUpdate() {} void ntripServerValidateTables() {} #endif // COMPILE_NTRIP_SERVER +//---------------------------------------- +// TCP client +//---------------------------------------- + +#ifndef COMPILE_TCP_CLIENT +void tcpClientDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} +int32_t tcpClientSendData(uint16_t dataHead) {return 0;} +void tcpClientUpdate() {} +void tcpClientValidateTables() {} +void tcpClientZeroTail() {} +#endif // COMPILE_TCP_CLIENT + //---------------------------------------- // Web Server //---------------------------------------- diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index e47319121..664551cb0 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -113,11 +113,12 @@ #if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR) #define COMPILE_NETWORK +#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality #define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality #define COMPILE_NTRIP_CLIENT // Comment out to remove NTRIP client functionality #define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality #define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update -#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality +#define COMPILE_TCP_CLIENT // Comment out to remove TCP client functionality #endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR // Always define ENABLE_DEVELOPER to enable its use in conditional statements diff --git a/Firmware/RTK_Everywhere/TcpClient.ino b/Firmware/RTK_Everywhere/TcpClient.ino index e45def741..feae0cff6 100644 --- a/Firmware/RTK_Everywhere/TcpClient.ino +++ b/Firmware/RTK_Everywhere/TcpClient.ino @@ -115,7 +115,7 @@ TcpClient.ino * private SNIP NTRIP caster */ -#ifdef COMPILE_NETWORK +#ifdef COMPILE_TCP_CLIENT //---------------------------------------- // Constants @@ -599,4 +599,4 @@ void tcpClientZeroTail() tcpClientTail = 0; } -#endif // COMPILE_NETWORK +#endif // COMPILE_TCP_CLIENT diff --git a/Firmware/RTK_Everywhere/check.sh b/Firmware/RTK_Everywhere/check.sh index aa650ad38..5f9daaa0a 100755 --- a/Firmware/RTK_Everywhere/check.sh +++ b/Firmware/RTK_Everywhere/check.sh @@ -77,6 +77,11 @@ sed -i 's|#define COMPILE_NTRIP_SERVER|//#define COMPILE_NTRIP_SERVER|' RTK_Ever make git reset --hard --quiet HEAD +# TCP Client +sed -i 's|#define COMPILE_TCP_CLIENT|//#define COMPILE_TCP_CLIENT|' RTK_Everywhere.ino +make +git reset --hard --quiet HEAD + # UM980 sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino make From 9fa213a8fee238f1f86287a689ab0239579f7307 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 08:12:02 -1000 Subject: [PATCH 4/6] Build with COMPILE_TCP_SERVER commented out --- Firmware/RTK_Everywhere/Developer.ino | 21 ++++++++++++--------- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 1 + Firmware/RTK_Everywhere/TcpServer.ino | 4 ++-- Firmware/RTK_Everywhere/check.sh | 5 +++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index b8780500c..a770e6873 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -62,15 +62,6 @@ void networkUserRemove(NETCONSUMER_t consumer, const char * fileName, uint32_t l void networkValidateIndex(NetIndex_t index) {} void networkVerifyTables() {} -//---------------------------------------- -// TCP server -//---------------------------------------- - -void tcpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} -int32_t tcpServerSendData(uint16_t dataHead) {return 0;} -void tcpServerZeroTail() {} -void tcpServerValidateTables() {} - //---------------------------------------- // UDP server //---------------------------------------- @@ -163,6 +154,18 @@ void tcpClientValidateTables() {} void tcpClientZeroTail() {} #endif // COMPILE_TCP_CLIENT +//---------------------------------------- +// TCP server +//---------------------------------------- + +#ifndef COMPILE_TCP_SERVER +void tcpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} +int32_t tcpServerSendData(uint16_t dataHead) {return 0;} +void tcpServerUpdate() {} +void tcpServerValidateTables() {} +void tcpServerZeroTail() {} +#endif // COMPILE_TCP_SERVER + //---------------------------------------- // Web Server //---------------------------------------- diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index 664551cb0..576bfe96d 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -119,6 +119,7 @@ #define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality #define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update #define COMPILE_TCP_CLIENT // Comment out to remove TCP client functionality +#define COMPILE_TCP_SERVER // Comment out to remove TCP server functionality #endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR // Always define ENABLE_DEVELOPER to enable its use in conditional statements diff --git a/Firmware/RTK_Everywhere/TcpServer.ino b/Firmware/RTK_Everywhere/TcpServer.ino index f3ad3e840..51a47c400 100644 --- a/Firmware/RTK_Everywhere/TcpServer.ino +++ b/Firmware/RTK_Everywhere/TcpServer.ino @@ -55,7 +55,7 @@ tcpServer.ino a new connection to the TCP server. */ -#ifdef COMPILE_NETWORK +#ifdef COMPILE_TCP_SERVER //---------------------------------------- // Constants @@ -802,4 +802,4 @@ void tcpServerZeroTail() tcpServerClientTails[index] = 0; } -#endif // COMPILE_NETWORK +#endif // COMPILE_TCP_SERVER diff --git a/Firmware/RTK_Everywhere/check.sh b/Firmware/RTK_Everywhere/check.sh index 5f9daaa0a..c8969f5e4 100755 --- a/Firmware/RTK_Everywhere/check.sh +++ b/Firmware/RTK_Everywhere/check.sh @@ -82,6 +82,11 @@ sed -i 's|#define COMPILE_TCP_CLIENT|//#define COMPILE_TCP_CLIENT|' RTK_Everywhe make git reset --hard --quiet HEAD +# TCP Server +sed -i 's|#define COMPILE_TCP_SERVER|//#define COMPILE_TCP_SERVER|' RTK_Everywhere.ino +make +git reset --hard --quiet HEAD + # UM980 sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino make From 0005667ee3797613c7a2cd6b33a883f585101f45 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 08:51:16 -1000 Subject: [PATCH 5/6] Build with COMPILE_UDP_SERVER commented out --- Firmware/RTK_Everywhere/Developer.ino | 26 ++++++++++++---------- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 1 + Firmware/RTK_Everywhere/UdpServer.ino | 4 ++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index a770e6873..36fbfb859 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -27,12 +27,12 @@ void ntpServerStop() {} #endif // COMPILE_ETHERNET -#ifndef COMPILE_NETWORK - //---------------------------------------- // Network layer //---------------------------------------- +#ifndef COMPILE_NETWORK + void menuTcpUdp() {systemPrint("**Network not compiled**");} void networkBegin() {} void networkConsumerAdd(NETCONSUMER_t consumer, NetIndex_t network, const char * fileName, uint32_t lineNumber) {} @@ -62,16 +62,6 @@ void networkUserRemove(NETCONSUMER_t consumer, const char * fileName, uint32_t l void networkValidateIndex(NetIndex_t index) {} void networkVerifyTables() {} -//---------------------------------------- -// UDP server -//---------------------------------------- - -void udpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} -int32_t udpServerSendData(uint16_t dataHead) {return 0;} -void udpServerStop() {} -void udpServerUpdate() {} -void udpServerZeroTail() {} - #endif // COMPILE_NETWORK //---------------------------------------- @@ -166,6 +156,18 @@ void tcpServerValidateTables() {} void tcpServerZeroTail() {} #endif // COMPILE_TCP_SERVER +//---------------------------------------- +// UDP server +//---------------------------------------- + +#ifndef COMPILE_UDP_SERVER +void udpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {} +int32_t udpServerSendData(uint16_t dataHead) {return 0;} +void udpServerStop() {} +void udpServerUpdate() {} +void udpServerZeroTail() {} +#endif // COMPILE_UDP_SERVER + //---------------------------------------- // Web Server //---------------------------------------- diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index 576bfe96d..1bccd7141 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -120,6 +120,7 @@ #define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update #define COMPILE_TCP_CLIENT // Comment out to remove TCP client functionality #define COMPILE_TCP_SERVER // Comment out to remove TCP server functionality +#define COMPILE_UDP_SERVER // Comment out to remove UDP server functionality #endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR // Always define ENABLE_DEVELOPER to enable its use in conditional statements diff --git a/Firmware/RTK_Everywhere/UdpServer.ino b/Firmware/RTK_Everywhere/UdpServer.ino index ea034b153..3eddd59e2 100644 --- a/Firmware/RTK_Everywhere/UdpServer.ino +++ b/Firmware/RTK_Everywhere/UdpServer.ino @@ -59,7 +59,7 @@ UdpServer.ino 3. Verify that the displayed coordinates, fix tpe etc. are valid */ -#ifdef COMPILE_NETWORK +#ifdef COMPILE_UDP_SERVER //---------------------------------------- // Constants @@ -436,4 +436,4 @@ void udpServerZeroTail() udpServerTail = 0; } -#endif // COMPILE_NETWORK +#endif // COMPILE_UDP_SERVER From 17d74dd234c95086c4895fdb2b9d6374893a3de1 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 14 Nov 2025 08:36:31 -1000 Subject: [PATCH 6/6] Build with COMPILE_NTP commented out --- Firmware/RTK_Everywhere/Developer.ino | 26 ++++++++++++---------- Firmware/RTK_Everywhere/NTP.ino | 4 ++-- Firmware/RTK_Everywhere/RTK_Everywhere.ino | 4 ++++ Firmware/RTK_Everywhere/States.ino | 4 ++-- Firmware/RTK_Everywhere/check.sh | 5 +++++ 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/Firmware/RTK_Everywhere/Developer.ino b/Firmware/RTK_Everywhere/Developer.ino index 36fbfb859..d79e929f0 100644 --- a/Firmware/RTK_Everywhere/Developer.ino +++ b/Firmware/RTK_Everywhere/Developer.ino @@ -3,28 +3,18 @@ mode (ENABLE_DEVELOPER defined). */ -#ifndef COMPILE_ETHERNET - //---------------------------------------- // Ethernet //---------------------------------------- +#ifndef COMPILE_ETHERNET + bool ethernetLinkUp() {return false;} void menuEthernet() {systemPrintln("**Ethernet not compiled**");} void ethernetUpdate() {} bool ntpLogIncreasing = false; -//---------------------------------------- -// NTP: Network Time Protocol -//---------------------------------------- - -void menuNTP() {systemPrint("**NTP not compiled**");} -void ntpServerBegin() {} -void ntpServerUpdate() {} -void ntpValidateTables() {} -void ntpServerStop() {} - #endif // COMPILE_ETHERNET //---------------------------------------- @@ -107,6 +97,18 @@ void mqttClientValidateTables() {} #endif // COMPILE_MQTT_CLIENT +//---------------------------------------- +// NTP: Network Time Protocol +//---------------------------------------- + +#ifndef COMPILE_NTP +void menuNTP() {systemPrint("**NTP not compiled**");} +void ntpServerBegin() {} +void ntpServerUpdate() {} +void ntpValidateTables() {} +void ntpServerStop() {} +#endif // COMPILE_NTP + //---------------------------------------- // NTRIP client //---------------------------------------- diff --git a/Firmware/RTK_Everywhere/NTP.ino b/Firmware/RTK_Everywhere/NTP.ino index 8a8c1878d..1f306b0b3 100644 --- a/Firmware/RTK_Everywhere/NTP.ino +++ b/Firmware/RTK_Everywhere/NTP.ino @@ -51,7 +51,7 @@ NTP.ino ------------------------------------------------------------------------------*/ -#ifdef COMPILE_ETHERNET +#ifdef COMPILE_NTP //---------------------------------------- // Constants @@ -983,4 +983,4 @@ void ntpValidateTables() reportFatalError("Fix ntpServerStateNameEntries to match NTP_STATE"); } -#endif // COMPILE_ETHERNET +#endif // COMPILE_NTP diff --git a/Firmware/RTK_Everywhere/RTK_Everywhere.ino b/Firmware/RTK_Everywhere/RTK_Everywhere.ino index 1bccd7141..c48242401 100644 --- a/Firmware/RTK_Everywhere/RTK_Everywhere.ino +++ b/Firmware/RTK_Everywhere/RTK_Everywhere.ino @@ -93,6 +93,10 @@ #define COMPILE_AUTHENTICATION // Comment out to disable MFi authentication #endif +#ifdef COMPILE_ETHERNET +#define COMPILE_NTP // Comment out to disable NTP functionality +#endif // COMPILE_ETHERNET + #ifdef COMPILE_WIFI #define COMPILE_AP // Requires WiFi. Comment out to remove Access Point functionality #define COMPILE_ESPNOW // Requires WiFi. Comment out to remove ESP-NOW functionality. diff --git a/Firmware/RTK_Everywhere/States.ino b/Firmware/RTK_Everywhere/States.ino index b66a06661..a5c3be861 100644 --- a/Firmware/RTK_Everywhere/States.ino +++ b/Firmware/RTK_Everywhere/States.ino @@ -564,7 +564,7 @@ void stateUpdate() } break; -#ifdef COMPILE_ETHERNET +#ifdef COMPILE_NTP case (STATE_NTPSERVER_NOT_STARTED): { RTK_MODE(RTK_MODE_NTP); firstRoverStart = false; // If NTP is starting, no test menu, normal button use. @@ -627,7 +627,7 @@ void stateUpdate() } break; -#endif // COMPILE_ETHERNET +#endif // COMPILE_NTP case (STATE_SHUTDOWN): { forceDisplayUpdate = true; diff --git a/Firmware/RTK_Everywhere/check.sh b/Firmware/RTK_Everywhere/check.sh index c8969f5e4..b7d0c1c54 100755 --- a/Firmware/RTK_Everywhere/check.sh +++ b/Firmware/RTK_Everywhere/check.sh @@ -67,6 +67,11 @@ sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.i make git reset --hard --quiet HEAD +# NTP Server +sed -i 's|#define COMPILE_NTP|//#define COMPILE_NTP|' RTK_Everywhere.ino +make +git reset --hard --quiet HEAD + # NTRIP Client sed -i 's|#define COMPILE_NTRIP_CLIENT|//#define COMPILE_NTRIP_CLIENT|' RTK_Everywhere.ino make