From 1282c4d5b520e447b51cbd9d107a72048b28724d Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Tue, 8 Jan 2019 23:33:56 +0100 Subject: [PATCH] wifimanager.cpp / wifimanager.h added define that checks on esp32 or esp8266. If another hardware is selectec, then do not try to compile this code. --- WiFiManager.cpp | 4 ++++ WiFiManager.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 37e86dc..f39be6c 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -12,6 +12,8 @@ #include "WiFiManager.h" +#if defined(ESP8266) || defined(ESP32) + #ifdef ESP32 uint8_t WiFiManager::_lastconxresulttmp = WL_IDLE_STATUS; #endif @@ -2700,3 +2702,5 @@ void WiFiManager::WiFi_autoReconnect(){ // } #endif } + +#endif \ No newline at end of file diff --git a/WiFiManager.h b/WiFiManager.h index dd1ab8a..cedbbb8 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -10,9 +10,12 @@ * @license MIT */ + #ifndef WiFiManager_h #define WiFiManager_h +#if defined(ESP8266) || defined(ESP32) + #ifdef ESP8266 #include #endif @@ -506,3 +509,5 @@ class WiFiManager }; #endif + +#endif \ No newline at end of file