mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
добавил возможность отключать веб сервер
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
|
||||
#define JSON_BUFFER_SIZE 4096
|
||||
|
||||
#define ACYNC_WEB_SERVER
|
||||
#define STANDARD_WEB_SERVER
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define USE_LITTLEFS true
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
//константы
|
||||
#include "Const.h"
|
||||
|
||||
//внешние глобальные директории
|
||||
#include <Arduino.h>
|
||||
@@ -15,18 +17,22 @@
|
||||
#include <ESP8266httpUpdate.h>
|
||||
#endif
|
||||
|
||||
#ifdef ACYNC_WEB_SERVER
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#endif
|
||||
|
||||
#include <FS.h>
|
||||
|
||||
//внутренние глобальные директории проекта
|
||||
#include "Const.h"
|
||||
#include "Utils/FileUtils.h"
|
||||
#include "Utils/JsonUtils.h"
|
||||
#include "Utils/SerialPrint.h"
|
||||
|
||||
//глобальные объекты классов
|
||||
extern TickerScheduler ts;
|
||||
#ifdef ACYNC_WEB_SERVER
|
||||
extern AsyncWebServer server;
|
||||
#endif
|
||||
|
||||
//глобальные переменные
|
||||
extern String settingsFlashJson;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
#ifdef ACYNC_WEB_SERVER
|
||||
extern AsyncWebSocket ws;
|
||||
extern AsyncEventSource events;
|
||||
|
||||
void webServerInit();
|
||||
void webSocketsInit();
|
||||
void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type, void *arg, uint8_t *data, size_t len);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user