1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-22 04:00:55 +00:00

Fix littlefs include

Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
Lukas Bachschwell 2020-08-26 22:13:21 +02:00
parent c02f357d84
commit 1b7af71d29
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425

View File

@ -11,7 +11,7 @@
#if defined(ESP32)
#include "SPIFFS.h"
#include "LittleFS.h"
#include "WiFi.h"
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
@ -23,7 +23,7 @@
#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <FS.h>
#include <LittleFS.h>
#include <Hash.h>
#include <SPIFFSEditor.h>
@ -33,7 +33,8 @@
// Message Types (and control types)
enum ControlType : uint8_t {
enum ControlType : uint8_t
{
// fixed controls
Title = 0,
@ -101,7 +102,18 @@ enum ControlType : uint8_t {
#define CLEAR_GRAPH ControlType::ClearGraph
// Colors
enum ControlColor : uint8_t { Turquoise, Emerald, Peterriver, Wetasphalt, Sunflower, Carrot, Alizarin, Dark, None = 0xFF };
enum ControlColor : uint8_t
{
Turquoise,
Emerald,
Peterriver,
Wetasphalt,
Sunflower,
Carrot,
Alizarin,
Dark,
None = 0xFF
};
#define COLOR_TURQUOISE ControlColor::Turquoise
#define COLOR_EMERALD ControlColor::Emerald
#define COLOR_PETERRIVER ControlColor::Peterriver
@ -112,7 +124,8 @@ enum ControlColor : uint8_t { Turquoise, Emerald, Peterriver, Wetasphalt, Sunflo
#define COLOR_DARK ControlColor::Dark
#define COLOR_NONE ControlColor::None
class Control {
class Control
{
public:
ControlType type;
uint16_t id; // just mirroring the id here for practical reasons
@ -127,7 +140,8 @@ public:
Control(ControlType type, const char *label, void (*callback)(Control *, int), String value, ControlColor color,
uint16_t parentControl = Control::noParent)
: type(type), label(label), callback(callback), value(value), color(color), parentControl(parentControl), next(nullptr) {
: type(type), label(label), callback(callback), value(value), color(color), parentControl(parentControl), next(nullptr)
{
id = idCounter++;
}
@ -162,11 +176,18 @@ private:
#define T_VALUE 10
#define S_VALUE 11
enum Verbosity : uint8_t { Quiet = 0, Verbose, VerboseJSON };
enum Verbosity : uint8_t
{
Quiet = 0,
Verbose,
VerboseJSON
};
class ESPUIClass {
class ESPUIClass
{
public:
ESPUIClass() {
ESPUIClass()
{
verbosity = Verbosity::Quiet;
jsonUpdateDocumentSize = 2000;
jsonInitialDocumentSize = 8000;