Skip to content

Commit 0800ffa

Browse files
authored
Merge pull request #782 from LeeLeahy2/no-tcp-client
Build with COMPILE_TCP_CLIENT commented out
2 parents 48fe15a + 4c2a800 commit 0800ffa

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ void networkUserRemove(NETCONSUMER_t consumer, const char * fileName, uint32_t l
6262
void networkValidateIndex(NetIndex_t index) {}
6363
void networkVerifyTables() {}
6464

65-
//----------------------------------------
66-
// TCP client
67-
//----------------------------------------
68-
69-
void tcpClientDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
70-
int32_t tcpClientSendData(uint16_t dataHead) {return 0;}
71-
void tcpClientUpdate() {}
72-
void tcpClientValidateTables() {}
73-
void tcpClientZeroTail() {}
74-
7565
//----------------------------------------
7666
// TCP server
7767
//----------------------------------------
@@ -161,6 +151,18 @@ void ntripServerUpdate() {}
161151
void ntripServerValidateTables() {}
162152
#endif // COMPILE_NTRIP_SERVER
163153

154+
//----------------------------------------
155+
// TCP client
156+
//----------------------------------------
157+
158+
#ifndef COMPILE_TCP_CLIENT
159+
void tcpClientDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
160+
int32_t tcpClientSendData(uint16_t dataHead) {return 0;}
161+
void tcpClientUpdate() {}
162+
void tcpClientValidateTables() {}
163+
void tcpClientZeroTail() {}
164+
#endif // COMPILE_TCP_CLIENT
165+
164166
//----------------------------------------
165167
// Web Server
166168
//----------------------------------------

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@
115115

116116
#if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR)
117117
#define COMPILE_NETWORK
118+
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
118119
#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality
119120
#define COMPILE_NTRIP_CLIENT // Comment out to remove NTRIP client functionality
120121
#define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality
121122
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
122-
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
123+
#define COMPILE_TCP_CLIENT // Comment out to remove TCP client functionality
123124
#endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR
124125

125126
// Always define ENABLE_DEVELOPER to enable its use in conditional statements

Firmware/RTK_Everywhere/TcpClient.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ TcpClient.ino
115115
* private SNIP NTRIP caster
116116
*/
117117

118-
#ifdef COMPILE_NETWORK
118+
#ifdef COMPILE_TCP_CLIENT
119119

120120
//----------------------------------------
121121
// Constants
@@ -599,4 +599,4 @@ void tcpClientZeroTail()
599599
tcpClientTail = 0;
600600
}
601601

602-
#endif // COMPILE_NETWORK
602+
#endif // COMPILE_TCP_CLIENT

Firmware/RTK_Everywhere/check.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ sed -i 's|#define COMPILE_NTRIP_SERVER|//#define COMPILE_NTRIP_SERVER|' RTK_Ever
8787
make
8888
git reset --hard --quiet HEAD
8989

90+
# TCP Client
91+
sed -i 's|#define COMPILE_TCP_CLIENT|//#define COMPILE_TCP_CLIENT|' RTK_Everywhere.ino
92+
make
93+
git reset --hard --quiet HEAD
94+
9095
# UM980
9196
sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino
9297
make

0 commit comments

Comments
 (0)