2021-12-22 14:49:25 +01:00
|
|
|
|
#pragma once
|
2021-12-23 18:18:32 +01:00
|
|
|
|
//константы
|
|
|
|
|
|
#include "Const.h"
|
2021-12-22 14:49:25 +01:00
|
|
|
|
|
2021-12-22 21:13:24 +01:00
|
|
|
|
//внешние глобальные директории
|
2021-12-22 14:49:25 +01:00
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
#include <ArduinoJson.h>
|
2021-12-23 17:48:01 +01:00
|
|
|
|
#include <TickerScheduler.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ESP32
|
2021-12-24 01:26:50 +01:00
|
|
|
|
#include "WiFi.h"
|
2021-12-23 17:48:01 +01:00
|
|
|
|
#include <HTTPClient.h>
|
|
|
|
|
|
#include <HTTPUpdate.h>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ESP8266
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#include <ESP8266WiFi.h>
|
2021-12-22 23:33:47 +01:00
|
|
|
|
#include <ESP8266httpUpdate.h>
|
2021-12-23 17:48:01 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#ifdef ASYNC_WEB_SERVER
|
2021-12-23 00:33:45 +01:00
|
|
|
|
#include <ESPAsyncWebServer.h>
|
2021-12-23 18:18:32 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#ifdef STANDARD_WEB_SERVER
|
2021-12-23 22:56:45 +01:00
|
|
|
|
#ifdef ESP8266
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#include <ESP8266WebServer.h>
|
|
|
|
|
|
#include <ESP8266HTTPUpdateServer.h>
|
|
|
|
|
|
#endif
|
2021-12-23 22:56:45 +01:00
|
|
|
|
#ifdef ESP32
|
|
|
|
|
|
#include <WebServer.h>
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
2021-12-23 22:42:19 +01:00
|
|
|
|
|
2021-12-23 23:47:13 +01:00
|
|
|
|
#ifdef STANDARD_WEB_SOCKETS
|
|
|
|
|
|
#include <WebSocketsServer.h>
|
2021-12-24 01:26:50 +01:00
|
|
|
|
#ifdef ESP8266
|
2021-12-23 23:47:13 +01:00
|
|
|
|
#include <Hash.h>
|
|
|
|
|
|
#endif
|
2021-12-24 01:26:50 +01:00
|
|
|
|
#endif
|
2021-12-23 23:47:13 +01:00
|
|
|
|
|
2021-12-22 14:49:25 +01:00
|
|
|
|
#include <FS.h>
|
2021-12-22 21:13:24 +01:00
|
|
|
|
|
|
|
|
|
|
//внутренние глобальные директории проекта
|
2021-12-22 23:47:35 +01:00
|
|
|
|
#include "Utils/FileUtils.h"
|
2021-12-22 23:33:47 +01:00
|
|
|
|
#include "Utils/JsonUtils.h"
|
2021-12-22 23:47:35 +01:00
|
|
|
|
#include "Utils/SerialPrint.h"
|
2021-12-22 23:33:47 +01:00
|
|
|
|
|
2021-12-23 23:47:13 +01:00
|
|
|
|
/*********************************************************************************************************************
|
|
|
|
|
|
*****************************************глобальные объекты классов***************************************************
|
|
|
|
|
|
**********************************************************************************************************************/
|
|
|
|
|
|
|
2021-12-22 23:33:47 +01:00
|
|
|
|
extern TickerScheduler ts;
|
2021-12-24 01:26:50 +01:00
|
|
|
|
extern WiFiClient espClient;
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#ifdef ASYNC_WEB_SERVER
|
2021-12-23 00:33:45 +01:00
|
|
|
|
extern AsyncWebServer server;
|
2021-12-23 18:18:32 +01:00
|
|
|
|
#endif
|
2021-12-22 23:33:47 +01:00
|
|
|
|
|
2021-12-23 22:42:19 +01:00
|
|
|
|
#ifdef STANDARD_WEB_SERVER
|
2021-12-23 22:56:45 +01:00
|
|
|
|
#ifdef ESP8266
|
2021-12-23 22:42:19 +01:00
|
|
|
|
extern ESP8266WebServer HTTP;
|
|
|
|
|
|
extern ESP8266HTTPUpdateServer httpUpdater;
|
|
|
|
|
|
#endif
|
2021-12-23 22:56:45 +01:00
|
|
|
|
#ifdef ESP32
|
|
|
|
|
|
extern WebServer HTTP;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
2021-12-23 22:42:19 +01:00
|
|
|
|
|
2021-12-23 23:47:13 +01:00
|
|
|
|
#ifdef STANDARD_WEB_SOCKETS
|
|
|
|
|
|
extern WebSocketsServer standWebSocket;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*********************************************************************************************************************
|
|
|
|
|
|
***********************************************глобальные переменные**************************************************
|
|
|
|
|
|
**********************************************************************************************************************/
|
2021-12-22 23:33:47 +01:00
|
|
|
|
extern String settingsFlashJson;
|
|
|
|
|
|
extern String paramsFlashJson;
|
2021-12-24 22:49:06 +01:00
|
|
|
|
extern String paramsHeapJson;
|
|
|
|
|
|
|
2021-12-25 00:19:58 +01:00
|
|
|
|
// extern DynamicJsonDocument settingsFlashJsonDoc;
|
|
|
|
|
|
// extern DynamicJsonDocument paramsFlashJsonDoc;
|
|
|
|
|
|
// extern DynamicJsonDocument paramsHeapJsonDoc;
|