Skip to content

Commit 48331d8

Browse files
authored
Merge pull request #784 from LeeLeahy2/no-udp-server
Build with COMPILE_UDP_SERVER commented out
2 parents c61278d + 0005667 commit 48331d8

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ void ntpServerStop() {}
2727

2828
#endif // COMPILE_ETHERNET
2929

30-
#ifndef COMPILE_NETWORK
31-
3230
//----------------------------------------
3331
// Network layer
3432
//----------------------------------------
3533

34+
#ifndef COMPILE_NETWORK
35+
3636
void menuTcpUdp() {systemPrint("**Network not compiled**");}
3737
void networkBegin() {}
3838
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
6262
void networkValidateIndex(NetIndex_t index) {}
6363
void networkVerifyTables() {}
6464

65-
//----------------------------------------
66-
// UDP server
67-
//----------------------------------------
68-
69-
void udpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
70-
int32_t udpServerSendData(uint16_t dataHead) {return 0;}
71-
void udpServerStop() {}
72-
void udpServerUpdate() {}
73-
void udpServerZeroTail() {}
74-
7565
#endif // COMPILE_NETWORK
7666

7767
//----------------------------------------
@@ -166,6 +156,18 @@ void tcpServerValidateTables() {}
166156
void tcpServerZeroTail() {}
167157
#endif // COMPILE_TCP_SERVER
168158

159+
//----------------------------------------
160+
// UDP server
161+
//----------------------------------------
162+
163+
#ifndef COMPILE_UDP_SERVER
164+
void udpServerDiscardBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET newTail) {}
165+
int32_t udpServerSendData(uint16_t dataHead) {return 0;}
166+
void udpServerStop() {}
167+
void udpServerUpdate() {}
168+
void udpServerZeroTail() {}
169+
#endif // COMPILE_UDP_SERVER
170+
169171
//----------------------------------------
170172
// Web Server
171173
//----------------------------------------

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
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
124124
#define COMPILE_TCP_SERVER // Comment out to remove TCP server functionality
125+
#define COMPILE_UDP_SERVER // Comment out to remove UDP server functionality
125126
#endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR
126127

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

Firmware/RTK_Everywhere/UdpServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ UdpServer.ino
5959
3. Verify that the displayed coordinates, fix tpe etc. are valid
6060
*/
6161

62-
#ifdef COMPILE_NETWORK
62+
#ifdef COMPILE_UDP_SERVER
6363

6464
//----------------------------------------
6565
// Constants
@@ -436,4 +436,4 @@ void udpServerZeroTail()
436436
udpServerTail = 0;
437437
}
438438

439-
#endif // COMPILE_NETWORK
439+
#endif // COMPILE_UDP_SERVER

0 commit comments

Comments
 (0)