From 082e6e703946175e7de88033779e337680fe3079 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Tue, 28 Jun 2016 01:45:43 +0300 Subject: [PATCH] disable some functions on ESP31B --- src/WebHandlerImpl.h | 2 ++ src/WebHandlers.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WebHandlerImpl.h b/src/WebHandlerImpl.h index 0dbc9f4..3b52560 100644 --- a/src/WebHandlerImpl.h +++ b/src/WebHandlerImpl.h @@ -49,8 +49,10 @@ class AsyncStaticWebHandler: public AsyncWebHandler { AsyncStaticWebHandler& setCacheControl(const char* cache_control); AsyncStaticWebHandler& setLastModified(const char* last_modified); AsyncStaticWebHandler& setLastModified(struct tm* last_modified); + #ifdef ESP8266 AsyncStaticWebHandler& setLastModified(time_t last_modified); AsyncStaticWebHandler& setLastModified(); //sets to current time. Make sure sntp is runing and time is updated + #endif }; class AsyncCallbackWebHandler: public AsyncWebHandler { diff --git a/src/WebHandlers.cpp b/src/WebHandlers.cpp index a77ee0e..d125992 100644 --- a/src/WebHandlers.cpp +++ b/src/WebHandlers.cpp @@ -67,7 +67,7 @@ AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(struct tm* last_mo strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified); return setLastModified((const char *)result); } - +#ifdef ESP8266 AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t last_modified){ return setLastModified((struct tm *)gmtime(&last_modified)); } @@ -78,7 +78,7 @@ AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(){ return *this; return setLastModified(last_modified); } - +#endif bool AsyncStaticWebHandler::canHandle(AsyncWebServerRequest *request) { if (request->method() == HTTP_GET &&