финальная версия с двумя серверами esp8266 и esp32

This commit is contained in:
Dmitry Borisenko
2021-12-23 22:56:45 +01:00
parent 9d0841df99
commit 401aaa727e
7 changed files with 22 additions and 5 deletions

View File

@@ -7,9 +7,14 @@ AsyncWebServer server(80);
#endif
#ifdef STANDARD_WEB_SERVER
#ifdef ESP8266
ESP8266HTTPUpdateServer httpUpdater;
ESP8266WebServer HTTP(80);
#endif
#ifdef ESP32
WebServer HTTP(80);
#endif
#endif
//глобальные переменные
String settingsFlashJson = "{}"; //переменная в которой хранятся все настройки, находится в оперативной памяти и синхронизированна с flash памятью

View File

@@ -24,7 +24,7 @@ void standWebServerInit() {
File fsUploadFile;
void standWebServerFiles() {
#ifdef RSET_FILE_OPERATIONS
#ifdef REST_FILE_OPERATIONS
SPIFFS.begin();
{
Dir dir = SPIFFS.openDir("/");
@@ -107,7 +107,7 @@ String getContentType(String filename) {
return "text/plain";
}
#ifdef RSET_FILE_OPERATIONS
#ifdef REST_FILE_OPERATIONS
// Здесь функции для работы с файловой системой
void handleFileUpload() {
if (HTTP.uri() != "/edit") return;