Skip to content

Commit d33f143

Browse files
committed
Rename Network to WLEDNetwork due to clash with IDF upgrade
1 parent cce24ba commit d33f143

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

wled00/e131.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void prepareArtnetPollReply(ArtPollReply *reply) {
425425

426426
reply->reply_opcode = ARTNET_OPCODE_OPPOLLREPLY;
427427

428-
IPAddress localIP = Network.localIP();
428+
IPAddress localIP = WLEDNetwork.localIP();
429429
for (uint8_t i = 0; i < 4; i++) {
430430
reply->reply_ip[i] = localIP[i];
431431
}
@@ -500,7 +500,7 @@ void prepareArtnetPollReply(ArtPollReply *reply) {
500500
// A DMX to / from Art-Net device
501501
reply->reply_style = 0x00;
502502

503-
Network.localMAC(reply->reply_mac);
503+
WLEDNetwork.localMAC(reply->reply_mac);
504504

505505
for (uint8_t i = 0; i < 4; i++) {
506506
reply->reply_bind_ip[i] = localIP[i];

wled00/improv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ void sendImprovRPCResult(ImprovRPCType type, uint8_t n_strings, const char **str
178178
}
179179

180180
void sendImprovIPRPCResult(ImprovRPCType type) {
181-
if (Network.isConnected())
181+
if (WLEDNetwork.isConnected())
182182
{
183183
char urlStr[64];
184-
IPAddress localIP = Network.localIP();
184+
IPAddress localIP = WLEDNetwork.localIP();
185185
uint8_t len = sprintf(urlStr, "http://%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]);
186186
if (len > 24) return; //sprintf fail?
187187
const char *str[1] = {urlStr};

wled00/json.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,9 +1196,9 @@ void serializeInfo(JsonObject root)
11961196
root[F("product")] = F(WLED_PRODUCT_NAME); //WLEDMM + Moustachauve/Wled-Native
11971197
root["mac"] = escapedMac;
11981198
char s[16] = "";
1199-
if (Network.isConnected())
1199+
if (WLEDNetwork.isConnected())
12001200
{
1201-
IPAddress localIP = Network.localIP();
1201+
IPAddress localIP = WLEDNetwork.localIP();
12021202
sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]);
12031203
}
12041204
root["ip"] = s;

wled00/src/dependencies/network/Network.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ bool NetworkClass::isEthernet()
8888
return false;
8989
}
9090

91-
NetworkClass Network;
91+
NetworkClass WLEDNetwork;

wled00/src/dependencies/network/Network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class NetworkClass
1919
bool isEthernet();
2020
};
2121

22-
extern NetworkClass Network;
22+
extern NetworkClass WLEDNetwork;
2323

2424
#endif

wled00/udp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void notify(byte callMode, bool followUp)
139139
//next value to be added has index: udpOut[offs + 0]
140140

141141
IPAddress broadcastIp;
142-
broadcastIp = ~uint32_t(Network.subnetMask()) | uint32_t(Network.gatewayIP());
142+
broadcastIp = ~uint32_t(WLEDNetwork.subnetMask()) | uint32_t(WLEDNetwork.gatewayIP());
143143

144144
if (0 != notifierUdp.beginPacket(broadcastIp, udpPort)) { // WLEDMM beginPacket == 0 --> error
145145
notifierUdp.write(udpOut, WLEDPACKETSIZE);
@@ -319,7 +319,7 @@ void handleNotifications()
319319
if (!(receiveNotifications || receiveDirect)) {return;}
320320
#endif
321321

322-
localIP = Network.localIP();
322+
localIP = WLEDNetwork.localIP();
323323
//notifier and UDP realtime
324324
#ifdef ARDUINO_ARCH_ESP32
325325
if (!packetSize || packetSize > UDP_IN_MAXSIZE) {notifierUdp.flush(); notifier2Udp.flush(); return;}
@@ -697,7 +697,7 @@ void sendSysInfoUDP()
697697
{
698698
if (!udp2Connected) return;
699699

700-
IPAddress ip = Network.localIP();
700+
IPAddress ip = WLEDNetwork.localIP();
701701
if (!ip || ip == IPAddress(255,255,255,255)) ip = IPAddress(4,3,2,1);
702702

703703
// TODO: make a nice struct of it and clean up

wled00/wled.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ void WLED::handleConnection()
13471347
wasConnected = false;
13481348
return;
13491349
}
1350-
if (!Network.isConnected()) {
1350+
if (!WLEDNetwork.isConnected()) {
13511351
if (interfacesInited) {
13521352
USER_PRINTLN(F("Disconnected!"));
13531353
interfacesInited = false;
@@ -1370,8 +1370,8 @@ void WLED::handleConnection()
13701370
} else if (!interfacesInited) { //newly connected
13711371
USER_PRINTLN("");
13721372
USER_PRINT(F("Connected! IP address: http://"));
1373-
USER_PRINT(Network.localIP());
1374-
if (Network.isEthernet()) {
1373+
USER_PRINT(WLEDNetwork.localIP());
1374+
if (WLEDNetwork.isEthernet()) {
13751375
#if ESP32
13761376
USER_PRINTLN(" via Ethernet (disabling WiFi)");
13771377
WiFi.disconnect(true);

wled00/xml.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void URL_response(AsyncWebServerRequest *request)
8282

8383
char s[16];
8484
oappend(SET_F("http://"));
85-
IPAddress localIP = Network.localIP();
85+
IPAddress localIP = WLEDNetwork.localIP();
8686
sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]);
8787
oappend(s);
8888

@@ -359,10 +359,10 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W
359359
oappend(SET_F("document.getElementById('ethd').style.display='none';"));
360360
#endif
361361

362-
if (Network.isConnected()) //is connected
362+
if (WLEDNetwork.isConnected()) //is connected
363363
{
364364
char s[32];
365-
IPAddress localIP = Network.localIP();
365+
IPAddress localIP = WLEDNetwork.localIP();
366366
sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]);
367367

368368
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)

0 commit comments

Comments
 (0)