From 59d77f2362cb60a550618333c769ff8edbebff5c Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sat, 26 Sep 2020 08:42:24 +0100 Subject: [PATCH] Remove unnecessary #iddefs These are only avoiding files that alrerady self-destruct... so they don't need to be avoided. --- CommandStation-EX.ino | 11 ++--------- DCCEXParser.cpp | 2 -- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index e9b33eb..36b4660 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -18,17 +18,8 @@ #include "DIAG.h" #include "DCCEXParser.h" #include "version.h" -#ifdef WIFI_ON #include "WifiInterface.h" -#endif -#if ENABLE_FREE_MEM_WARNING -#include "freeMemory.h" -int ramLowWatermark = 32767; // This figure gets overwritten dynamically in loop() -#endif - -#if defined(ARDUINO_ARCH_MEGAAVR) #include -#endif @@ -222,6 +213,8 @@ void loop() // 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 + int freeNow = freeMemory(); if (freeNow < ramLowWatermark) { diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 282237b..7433576 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -23,9 +23,7 @@ #include "DCCEXParser.h" #include "DCC.h" #include "DCCWaveform.h" -#ifdef WIFI_ON #include "WifiInterface.h" -#endif #include "Turnouts.h" #include "Outputs.h" #include "Sensors.h"