Skip to content

Commit c61278d

Browse files
authored
Merge pull request #783 from LeeLeahy2/no-tcp-server
Build with COMPILE_TCP_SERVER commented out
2 parents 0800ffa + 9fa213a commit c61278d

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +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 server
67-
//----------------------------------------
68-
69-
void tcpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
70-
int32_t tcpServerSendData(uint16_t dataHead) {return 0;}
71-
void tcpServerZeroTail() {}
72-
void tcpServerValidateTables() {}
73-
7465
//----------------------------------------
7566
// UDP server
7667
//----------------------------------------
@@ -163,6 +154,18 @@ void tcpClientValidateTables() {}
163154
void tcpClientZeroTail() {}
164155
#endif // COMPILE_TCP_CLIENT
165156

157+
//----------------------------------------
158+
// TCP server
159+
//----------------------------------------
160+
161+
#ifndef COMPILE_TCP_SERVER
162+
void tcpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
163+
int32_t tcpServerSendData(uint16_t dataHead) {return 0;}
164+
void tcpServerUpdate() {}
165+
void tcpServerValidateTables() {}
166+
void tcpServerZeroTail() {}
167+
#endif // COMPILE_TCP_SERVER
168+
166169
//----------------------------------------
167170
// Web Server
168171
//----------------------------------------

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
#define COMPILE_NTRIP_SERVER // Comment out to remove NTRIP server functionality
122122
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
123123
#define COMPILE_TCP_CLIENT // Comment out to remove TCP client functionality
124+
#define COMPILE_TCP_SERVER // Comment out to remove TCP server functionality
124125
#endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR
125126

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

Firmware/RTK_Everywhere/TcpServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ tcpServer.ino
5555
a new connection to the TCP server.
5656
*/
5757

58-
#ifdef COMPILE_NETWORK
58+
#ifdef COMPILE_TCP_SERVER
5959

6060
//----------------------------------------
6161
// Constants
@@ -802,4 +802,4 @@ void tcpServerZeroTail()
802802
tcpServerClientTails[index] = 0;
803803
}
804804

805-
#endif // COMPILE_NETWORK
805+
#endif // COMPILE_TCP_SERVER

Firmware/RTK_Everywhere/check.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ sed -i 's|#define COMPILE_TCP_CLIENT|//#define COMPILE_TCP_CLIENT|' RTK_Everywhe
9292
make
9393
git reset --hard --quiet HEAD
9494

95+
# TCP Server
96+
sed -i 's|#define COMPILE_TCP_SERVER|//#define COMPILE_TCP_SERVER|' RTK_Everywhere.ino
97+
make
98+
git reset --hard --quiet HEAD
99+
95100
# UM980
96101
sed -i 's|#define COMPILE_UM980|//#define COMPILE_UM980|' RTK_Everywhere.ino
97102
make

0 commit comments

Comments
 (0)