From a8000aae544f528c8f53e551370715772495fa6c Mon Sep 17 00:00:00 2001 From: dexslab Date: Sun, 4 Oct 2020 11:29:48 -0400 Subject: [PATCH] Changes for compatibility with Installer --- CommandStation-EX.ino | 6 +++--- defines.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index 5f1f87e..aceedef 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -73,7 +73,7 @@ void setup() // NOTE: References to Serial1 are for the serial port used to connect // your wifi chip/shield. -#ifdef WIFI_ON +#if WIFI_ON bool wifiUp = false; const __FlashStringHelper *wifiESSID = F(WIFI_SSID); const __FlashStringHelper *wifiPassword = F(WIFI_PASSWORD); @@ -123,10 +123,10 @@ void loop() serialParser.loop(Serial); // Responsibility 3: Optionally handle any incoming WiFi traffic -#ifdef WIFI_ON +#if WIFI_ON WifiInterface::loop(); #endif - + // Optionally report any decrease in memory (will automatically trigger on first call) #if ENABLE_FREE_MEM_WARNING static int ramLowWatermark = 32767; // replaced on first loop diff --git a/defines.h b/defines.h index 700687b..5d7f178 100644 --- a/defines.h +++ b/defines.h @@ -23,7 +23,9 @@ // WIFI_ON: All prereqs for running with WIFI are met // #if ENABLE_WIFI && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560)) -#define WIFI_ON +#define WIFI_ON true +#else +#define WIFI_ON false #endif ////////////////////////////////////////////////////////////////////////////////