This commit is contained in:
Yuri Trikoz
2020-12-20 01:24:08 +03:00
parent e60d5eb62f
commit 2aa3b56e85
13 changed files with 53 additions and 67 deletions

View File

@@ -4,7 +4,7 @@
#define FIRMWARE_VERSION 273
#define FLASH_SIZE_1MB true
//===========FileSystem==============================================================================================================================================
#define USE_LITTLEFS true
#define USE_LITTLEFS false
//==================================================================================================================================================================
#define NUM_BUTTONS 6
#define LED_PIN LED_BUILTIN

View File

@@ -5,7 +5,6 @@
#include <ESP8266httpUpdate.h>
#include "ESPAsyncTCP.h"
#include "ESPAsyncWebServer.h"
#include <LittleFS.h>
#include <SPIFFSEditor.h>
#include <Servo.h>
#include <WiFiUdp.h>

View File

@@ -1,9 +1,7 @@
#pragma once
#include <ESPAsyncWebServer.h>
//#include <FS.h>
#ifdef ESP8266
#include <LittleFS.h>
#endif
#include "FileSystem.h"
class FSEditor : public AsyncWebHandler {
private:
@@ -20,7 +18,7 @@ class FSEditor : public AsyncWebHandler {
#ifdef ESP32
FSEditor(const fs::FS& fs, const String& username = String(), const String& password = String());
#else
FSEditor(const String& username = String(), const String& password = String(), const fs::FS& fs = LittleFS);
FSEditor(const String& username = String(), const String& password = String(), const fs::FS& fs = FileFS);
#endif
virtual bool canHandle(AsyncWebServerRequest* request) override final;
virtual void handleRequest(AsyncWebServerRequest* request) override final;

View File

@@ -6,6 +6,8 @@
#define FILE_WRITE "w"
#define FILE_APPEND "a"
#include <FS.h>
#if USE_LITTLEFS
#include <LittleFS.h>
extern FS LittleFS;

View File

@@ -1,13 +1,7 @@
#pragma once
#include <Arduino.h>
//#include "FS.h"
#ifdef ESP32
#include "LITTLEFS.h"
#define LittleFS LITTLEFS
#endif
#ifdef ESP8266
#include <LittleFS.h>
#endif
#include "FileSystem.h"
class FileHelper {
public:

View File

@@ -1,14 +1,7 @@
#pragma once
#include <Arduino.h>
#include "Consts.h"
//#include "FS.h"
#ifdef ESP32
#include "LITTLEFS.h"
#define LittleFS LITTLEFS
#endif
#ifdef ESP8266
#include <LittleFS.h>
#endif
#include "FileSystem.h"
/*
* Инициализация ФС