libretiny

This commit is contained in:
Mit4el
2024-09-20 12:45:17 +03:00
parent b32abb5a28
commit 596eb9cad4
78 changed files with 8577 additions and 63 deletions

View File

@@ -52,6 +52,10 @@
#define FIRMWARE_NAME "esp32s3_16mb"
#endif
#ifdef LIBRETINY
#define FIRMWARE_NAME "libretiny"
#endif
// Размер буфера json
#define JSON_BUFFER_SIZE 4096 // держим 2 кб не меняем
@@ -72,8 +76,9 @@ WEB_SOCKETS_FRAME_SIZE создан для того что бы не загру
#define STANDARD_WEB_SERVER
#define STANDARD_WEB_SOCKETS
//#ifndef LIBRETINY
#define UDP_ENABLED
//#endif
// #define REST_FILE_OPERATIONS
#define MQTT_RECONNECT_INTERVAL 20000
@@ -94,7 +99,7 @@ enum TimerTask_t {
TIME,
TIME_SYNC,
UPTIME,
UDP, // UDPP
UDPt, // UDPP
TIMES, // периодические секундные проверки
PTASK,
ST,

View File

@@ -1,13 +1,15 @@
#pragma once
#include "Global.h"
#ifdef ESP8266
#if defined (ESP8266) || defined(LIBRETINY)
// эта библиотека встроена в ядро
#include "ESPAsyncUDP.h"
#else
#elif defined(ESP32)
#include "AsyncUDP.h"
#endif
#ifndef LIBRETINY
extern AsyncUDP asyncUdp;
#endif
extern const String getThisDevice();
extern void addThisDeviceToList();

View File

@@ -15,6 +15,18 @@ extern FS* filesystem;
#endif
#endif
#if defined(LIBRETINY)
#include <FS.h>
#include "LittleFS.h"
#define FileFS LittleFS
#define FS_NAME "LittleFS_LT"
#define FILE_READ "r"
#define FILE_WRITE "w"
#define FILE_APPEND "a"
#endif
#ifdef ESP8266
#if USE_LITTLEFS
#include "LittleFS.h"

View File

@@ -9,7 +9,7 @@
#include <PubSubClient.h>
#include <list>
#ifdef libretiny
#ifdef LIBRETINY
#include <vector>
#include <typedef.h>
#ifdef STANDARD_WEB_SERVER
@@ -90,7 +90,7 @@ extern ESP8266HTTPUpdateServer httpUpdater;
#ifdef ESP32
extern WebServer HTTP;
#endif
#ifdef libretiny
#ifdef LIBRETINY
extern WebServer HTTP;
#endif
#endif

View File

@@ -3,7 +3,7 @@
// #include "Upgrade.h"
#ifdef ESP8266
// #include "ESP8266.h"
#else
#elif ESP32
#include <HTTPUpdate.h>
#endif

View File

@@ -9,3 +9,6 @@ bool startAPMode();
boolean RouterFind(std::vector<String> jArray);
uint8_t RSSIquality();
extern void wifiSignalInit();
#ifdef LIBRETINY
String httpGetString(HTTPClient &http);
#endif