diff --git a/DCCEX.h b/DCCEX.h index fb4baef..d89d581 100644 --- a/DCCEX.h +++ b/DCCEX.h @@ -10,7 +10,9 @@ #include "DCCEXParser.h" #include "version.h" #include "WifiInterface.h" +#if ETHERNET_ON == true #include "EthernetInterface.h" +#endif #include "LCD_Implementation.h" #include "freeMemory.h" #include diff --git a/EthernetInterface.cpp b/EthernetInterface.cpp index 6251bac..1cc41b8 100644 --- a/EthernetInterface.cpp +++ b/EthernetInterface.cpp @@ -18,6 +18,9 @@ * */ +#include "config.h" +#include "defines.h" // This should be changed to DCCEX.h when possible +#if ETHERNET_ON == true #include "EthernetInterface.h" #include "DIAG.h" #include "CommandDistributor.h" @@ -166,8 +169,6 @@ void EthernetInterface::loop() if (Diag::ETHERNET) DIAG(F("Ethernet reply socket=%d, count=:%d\n"), socketOut,count); for(;count>0;count--) clients[socketOut].write(outboundRing->read()); clients[socketOut].flush(); //maybe - } - } - - +} +#endif diff --git a/LCD_Implementation.h b/LCD_Implementation.h index 1da344e..45e0429 100644 --- a/LCD_Implementation.h +++ b/LCD_Implementation.h @@ -25,6 +25,8 @@ // which libraray is involved. //////////////////////////////////////////////////////////////////////////////////// +#ifndef LCD_Implementation_h +#define LCD_Implementation_h #include "config.h" #include #include "LCDDisplay.h" @@ -50,6 +52,5 @@ LCDDisplay * LCDDisplay::lcdDisplay=0; #include "LCD_NONE.h" #define CONDITIONAL_LCD_START if (false) /* NO LCD CONFIG */ #endif - - +#endif // LCD_Implementation_h diff --git a/config.example.h b/config.example.h index 174e590..0c2d137 100644 --- a/config.example.h +++ b/config.example.h @@ -76,6 +76,14 @@ The configuration file for DCC++ EX Command Station // //#define WIFI_CONNECT_TIMEOUT 14000 +///////////////////////////////////////////////////////////////////////////////////// +// +// ENABLE_ETHERNET: Set to true if you have an Arduino Ethernet card (wired). This +// is not for Wifi. You will then need the Arduino Ethernet library as well +// +//#define ENABLE_ETHERNET true + + ///////////////////////////////////////////////////////////////////////////////////// // // DEFINE STATIC IP ADDRESS *OR* COMMENT OUT TO USE DHCP