From c9bc63e65916b36bb695b0c57796f19fafa7c9fe Mon Sep 17 00:00:00 2001 From: dexslab Date: Tue, 22 Sep 2020 15:59:34 -0400 Subject: [PATCH] Cleanup for wifi enabled and if on a mega --- CommandStation-EX.ino | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index e454d14..e2660e6 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -115,8 +115,7 @@ void setup() DIAG(F("\n===== DCC::getLocoId has returned, but the callback wont be executed until we are in loop() ======\n")); #endif -#if ENABLE_WIFI -#if defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) +#if ENABLE_WIFI && defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) bool wifiUp = false; const __FlashStringHelper *wifiESSID = F(WIFI_SSID); const __FlashStringHelper *wifiPassword = F(WIFI_PASSWORD); @@ -125,7 +124,6 @@ void setup() Serial1.begin(WIFI_SERIAL_LINK_SPEED); wifiUp = WifiInterface::setup(Serial1, wifiESSID, wifiPassword, dccex, port); -#if defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) if (!wifiUp) { Serial2.begin(WIFI_BAUD); @@ -136,8 +134,6 @@ void setup() Serial3.begin(WIFI_BAUD); wifiUp = WifiInterface::setup(Serial3, wifiESSID, wifiPassword, dccex, port); } -#endif -#endif #endif // Responsibility 3: Start the DCC engine.