Skip to content

Commit a9dffff

Browse files
committed
make some WIFI ifdef more easy to understand
1 parent 59cbe71 commit a9dffff

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CommandStation-EX.ino

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,14 @@ void setup()
111111
// Responsibility 2: Start all the communications before the DCC engine
112112
// Start the WiFi interface on a MEGA, Uno cannot currently handle WiFi
113113
// Start Ethernet if it exists
114-
#ifndef ARDUINO_ARCH_ESP32
115114
#if WIFI_ON
116115
PASSWDCHECK(WIFI_PASSWORD); // compile time check
116+
#ifndef ARDUINO_ARCH_ESP32
117117
WifiInterface::setup(WIFI_SERIAL_LINK_SPEED, F(WIFI_SSID), F(WIFI_PASSWORD), F(WIFI_HOSTNAME), IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
118-
#endif // WIFI_ON
119118
#else
120-
#if WIFI_ON
121-
PASSWDCHECK(WIFI_PASSWORD); // compile time check
122119
WifiESP::setup(WIFI_SSID, WIFI_PASSWORD, WIFI_HOSTNAME, IP_PORT, WIFI_CHANNEL, WIFI_FORCE_AP);
123-
#endif // WIFI_ON
124120
#endif // ARDUINO_ARCH_ESP32
121+
#endif // WIFI_ON
125122

126123
#if ETHERNET_ON
127124
EthernetInterface::setup();

DCCEXParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
737737
DCCDecoder::onoff(on);
738738
return;
739739
}
740-
#if ENABLE_WIFI
740+
#if WIFI_ON
741741
if (p[0] == "WIFI"_hk) { // <C WIFI SSID PASSWORD>
742742
if (params != 5) // the 5 params 0 to 4 are (kinda): WIFI_hk 0x7777 &SSID 0x7777 &PASSWORD
743743
break;

0 commit comments

Comments
 (0)