Skip to content

Commit ccb09f3

Browse files
authored
Merge pull request #780 from LeeLeahy2/no-ntrip-server
Build with COMPILE_NTRIP_SERVER commented out
2 parents 639be19 + 8b60d71 commit ccb09f3

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,6 @@ void ntripClientStop(bool clientAllocated) {online.ntripClient = false;}
7171
void ntripClientUpdate() {}
7272
void ntripClientValidateTables() {}
7373

74-
//----------------------------------------
75-
// NTRIP server
76-
//----------------------------------------
77-
78-
void ntripServerPrintStatus(int serverIndex) {systemPrintf("**NTRIP Server %d not compiled**\r\n", serverIndex);}
79-
void ntripServerProcessRTCM(int serverIndex, uint8_t incoming) {}
80-
void ntripServerStop(int serverIndex, bool shutdown) {online.ntripServer[serverIndex] = false;}
81-
void ntripServerUpdate() {}
82-
void ntripServerValidateTables() {}
83-
bool ntripServerIsCasting(int serverIndex) {
84-
return (false);
85-
}
86-
8774
//----------------------------------------
8875
// TCP client
8976
//----------------------------------------
@@ -131,6 +118,18 @@ void otaVerifyTables() {}
131118

132119
#endif // COMPILE_OTA_AUTO
133120

121+
//----------------------------------------
122+
// HTTP Client
123+
//----------------------------------------
124+
125+
#ifndef COMPILE_HTTP_CLIENT
126+
127+
void httpClientPrintStatus() {}
128+
void httpClientUpdate() {}
129+
void httpClientValidateTables() {}
130+
131+
#endif // COMPILE_HTTP_CLIENT
132+
134133
//----------------------------------------
135134
// MQTT Client
136135
//----------------------------------------
@@ -147,16 +146,17 @@ void mqttClientValidateTables() {}
147146
#endif // COMPILE_MQTT_CLIENT
148147

149148
//----------------------------------------
150-
// HTTP Client
149+
// NTRIP server
151150
//----------------------------------------
152151

153-
#ifndef COMPILE_HTTP_CLIENT
154-
155-
void httpClientPrintStatus() {}
156-
void httpClientUpdate() {}
157-
void httpClientValidateTables() {}
158-
159-
#endif // COMPILE_HTTP_CLIENT
152+
#ifndef COMPILE_NTRIP_SERVER
153+
bool ntripServerIsCasting(int serverIndex) {return false;}
154+
void ntripServerPrintStatus(int serverIndex) {systemPrintf("**NTRIP Server %d not compiled**\r\n", serverIndex);}
155+
void ntripServerProcessRTCM(int serverIndex, uint8_t incoming) {}
156+
void ntripServerStop(int serverIndex, bool shutdown) {online.ntripServer[serverIndex] = false;}
157+
void ntripServerUpdate() {}
158+
void ntripServerValidateTables() {}
159+
#endif // COMPILE_NTRIP_SERVER
160160

161161
//----------------------------------------
162162
// Web Server

Firmware/RTK_Everywhere/NtripServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ NtripServer.ino
122122
123123
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
124124

125-
#ifdef COMPILE_NETWORK
125+
#ifdef COMPILE_NTRIP_SERVER
126126

127127
//----------------------------------------
128128
// Constants
@@ -877,4 +877,4 @@ void ntripServerValidateTables()
877877
reportFatalError("Fix ntripServerStateNameEntries to match NTRIPServerState");
878878
}
879879

880-
#endif // COMPILE_NETWORK
880+
#endif // COMPILE_NTRIP_SERVER

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@
114114

115115
#if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR)
116116
#define COMPILE_NETWORK
117-
#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality
118-
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
119-
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
117+
#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality
118+
#define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality
119+
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
120+
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
120121
#endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR
121122

122123
// Always define ENABLE_DEVELOPER to enable its use in conditional statements
@@ -1596,7 +1597,7 @@ bool logLengthExceeded() // Limit individual files to maxLogLength_minutes
15961597

15971598
if (nextLogTime_ms == 0) // Keep logging if nextLogTime_ms has not been set
15981599
return false;
1599-
1600+
16001601
// Note: this will roll over every 49.71 days...
16011602
// Solution: https://stackoverflow.com/a/3097744 - see issue #742
16021603
return (!((long)(nextLogTime_ms - millis()) > 0));

Firmware/RTK_Everywhere/check.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ sed -i 's|#define COMPILE_MOSAICX5|//#define COMPILE_MOSAICX5|' RTK_Everywhere.i
7777
make
7878
git reset --hard --quiet HEAD
7979

80+
# NTRIP Server
81+
sed -i 's|#define COMPILE_NTRIP_SERVER|//#define COMPILE_NTRIP_SERVER|' RTK_Everywhere.ino
82+
make
83+
git reset --hard --quiet HEAD
84+
8085
# UM980
8186
sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino
8287
make

0 commit comments

Comments
 (0)