Skip to content

Commit 51314af

Browse files
committed
Verify COMPILE_* for AP, CELLULAR, ESPNOW, ETHERNET, MQTT, OTA and WIFI
Commenting out COMPILE_NETWORK alone still fails
1 parent a0d50f9 commit 51314af

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ void ntpServerStop() {}
3333

3434
void menuTcpUdp() {systemPrint("**Network not compiled**");}
3535
void networkBegin() {}
36+
uint8_t networkConsumers() {return(0);}
37+
uint16_t networkGetConsumerTypes() {return(0);}
3638
IPAddress networkGetIpAddress() {return("0.0.0.0");}
37-
const uint8_t * networkGetMacAddress()
39+
const uint8_t * networkGetMacAddress()
3840
{
3941
static const uint8_t zero[6] = {0, 0, 0, 0, 0, 0};
4042
#ifdef COMPILE_BT
@@ -49,10 +51,11 @@ bool networkInterfaceHasInternet(NetIndex_t index) {return false;}
4951
bool networkIsInterfaceStarted(NetIndex_t index) {return false;}
5052
void networkMarkOffline(NetIndex_t index) {}
5153
void networkMarkHasInternet(NetIndex_t index) {}
54+
void networkSequenceBoot(NetIndex_t index) {}
55+
void networkSequenceNextEntry(NetIndex_t index, bool debug) {}
5256
void networkUpdate() {}
57+
void networkValidateIndex(NetIndex_t index) {}
5358
void networkVerifyTables() {}
54-
uint16_t networkGetConsumerTypes() {return(0);}
55-
uint8_t networkConsumers() {return(0);}
5659

5760
//----------------------------------------
5861
// NTRIP client
@@ -114,9 +117,10 @@ void discardUdpServerBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET n
114117
#ifndef COMPILE_OTA_AUTO
115118

116119
void otaAutoUpdate() {}
120+
bool otaNeedsNetwork() {return false;}
121+
void otaUpdate() {}
117122
void otaUpdateStop() {}
118123
void otaVerifyTables() {}
119-
void otaUpdate() {}
120124

121125
#endif // COMPILE_OTA_AUTO
122126

@@ -127,6 +131,7 @@ void otaUpdate() {}
127131
#ifndef COMPILE_MQTT_CLIENT
128132

129133
bool mqttClientIsConnected() {return false;}
134+
bool mqttClientNeedsNetwork() {return false;}
130135
void mqttClientPrintStatus() {}
131136
void mqttClientRestart() {}
132137
void mqttClientUpdate() {}
@@ -157,9 +162,12 @@ bool webServerStart(int httpPort = 80)
157162
systemPrintln("**AP not compiled**");
158163
return false;
159164
}
160-
void webServerStop() {}
161165
bool parseIncomingSettings() {return false;}
162166
void sendStringToWebsocket(const char* stringToSend) {}
167+
void stopWebServer() {}
168+
bool webServerNeedsNetwork() {return false;}
169+
void webServerStop() {}
170+
void webServerUpdate() {}
163171

164172
#endif // COMPILE_AP
165173

@@ -188,14 +196,17 @@ void updateEspnow() {}
188196
#ifndef COMPILE_WIFI
189197

190198
void menuWiFi() {systemPrintln("**WiFi not compiled**");}
199+
bool wifiApIsRunning() {return false;}
191200
bool wifiConnect(bool startWiFiStation, bool startWiFiAP, unsigned long timeout) {return false;}
192-
bool wifiStart() {return false;}
201+
uint32_t wifiGetStartTimeout() {return 0;}
202+
bool wifiIsRunning() {return false;}
193203
int wifiNetworkCount() {return 0;}
204+
void wifiResetThrottleTimeout() {}
205+
void wifiResetTimeout() {}
206+
bool wifiStart() {return false;}
194207
bool wifiStationIsRunning() {return false;}
195-
bool wifiApIsRunning() {return false;}
196-
bool wifiIsRunning() {return false;}
197-
uint32_t wifiGetStartTimeout() {return 0;}
198208
#define WIFI_STOP() {}
209+
bool wifiUnavailable() {return true;}
199210

200211
#endif // COMPILE_WIFI
201212

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
#define COMPILE_POINTPERFECT_LIBRARY // Comment out to remove PPL support
4242
#define COMPILE_BQ40Z50 // Comment out to remove BQ40Z50 functionality
4343

44-
#if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET)
44+
#if defined(COMPILE_WIFI) || defined(COMPILE_ETHERNET) || defined(COMPILE_CELLULAR)
4545
#define COMPILE_NETWORK
4646
#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality
4747
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
4848
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
49-
#endif // COMPILE_WIFI || COMPILE_ETHERNET
49+
#endif // COMPILE_WIFI || COMPILE_ETHERNET || COMPILE_CELLULAR
5050

5151
// Always define ENABLE_DEVELOPER to enable its use in conditional statements
5252
#ifndef ENABLE_DEVELOPER

0 commit comments

Comments
 (0)