mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-29 18:19:09 +03:00
Merge branch 'dev'
This commit is contained in:
@@ -147,5 +147,6 @@ double ledcSetup(uint8_t chan, double freq, uint8_t bit_num) {
|
||||
void ledcAttachPin(uint8_t pin, uint8_t chan) {};
|
||||
void ledcWrite(uint8_t chan, uint32_t duty) {};
|
||||
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {};
|
||||
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {};
|
||||
|
||||
#endif
|
||||
@@ -59,6 +59,8 @@ typedef double double_t;
|
||||
|
||||
#define snprintf snprintf_P // to keep backwards compatibility
|
||||
|
||||
#define IRAM_ATTR
|
||||
|
||||
void pinMode(uint8_t pin, uint8_t mode);
|
||||
void digitalWrite(uint8_t pin, uint8_t value);
|
||||
int digitalRead(uint8_t pin);
|
||||
@@ -72,6 +74,7 @@ double ledcSetup(uint8_t chan, double freq, uint8_t bit_num);
|
||||
void ledcAttachPin(uint8_t pin, uint8_t chan);
|
||||
void ledcWrite(uint8_t chan, uint32_t duty);
|
||||
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
|
||||
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
|
||||
|
||||
#define PROGMEM
|
||||
#define PGM_P const char *
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,11 +21,12 @@
|
||||
#define NTP_SETTINGS_FILE "/config/ntpSettings.json"
|
||||
#define EMSESP_SETTINGS_FILE "/config/emsespSettings.json"
|
||||
|
||||
#define AP_MODE_ALWAYS 0
|
||||
class DummySettings {
|
||||
public:
|
||||
// SYSTEM
|
||||
bool bandwidth20 = false;
|
||||
bool nosleep = false;
|
||||
bool nosleep = true;
|
||||
|
||||
// MQTT
|
||||
uint16_t publish_time = 10;
|
||||
@@ -55,6 +56,7 @@ class DummySettings {
|
||||
uint16_t publish_time_other = 10;
|
||||
uint16_t publish_time_sensor = 10;
|
||||
uint16_t publish_time_heartbeat = 60;
|
||||
uint32_t publish_time_water = 0;
|
||||
|
||||
String hostname = "ems-esp";
|
||||
String jwtSecret = "ems-esp";
|
||||
@@ -72,8 +74,12 @@ class DummySettings {
|
||||
String CORSOrigin = "*";
|
||||
uint8_t tx_power = 0;
|
||||
|
||||
uint8_t provisionMode = 0;
|
||||
uint32_t publish_time_water = 0;
|
||||
// AP
|
||||
uint8_t provisionMode = 0;
|
||||
|
||||
// NTP
|
||||
String server = "pool.ntp.org";
|
||||
String tzLabel = "Europe/London";
|
||||
|
||||
static void read(DummySettings & settings, JsonObject root) {};
|
||||
static void read(DummySettings & settings) {};
|
||||
|
||||
@@ -243,6 +243,9 @@ class AsyncWebServer {
|
||||
void on(const char * uri, WebRequestMethodComposite method, ArRequestHandlerFunction onRequest) {};
|
||||
};
|
||||
|
||||
#ifndef SSE_MAX_QUEUED_MESSAGES
|
||||
#define SSE_MAX_QUEUED_MESSAGES 32
|
||||
#endif
|
||||
|
||||
class AsyncEventSource : public AsyncWebHandler {
|
||||
public:
|
||||
@@ -252,6 +255,9 @@ class AsyncEventSource : public AsyncWebHandler {
|
||||
size_t count() const {
|
||||
return 1;
|
||||
}
|
||||
size_t avgPacketsWaiting() const {
|
||||
return 0;
|
||||
};
|
||||
|
||||
void send(const char * message, const char * event = NULL, uint32_t id = 0, uint32_t reconnect = 0) {};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
|
||||
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
|
||||
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -12,8 +12,8 @@ class Preferences {
|
||||
bool _readOnly;
|
||||
|
||||
public:
|
||||
Preferences(){};
|
||||
~Preferences(){};
|
||||
Preferences() {};
|
||||
~Preferences() {};
|
||||
|
||||
bool begin(const char * name, bool readOnly = false, const char * partition_label = NULL) {
|
||||
return true;
|
||||
@@ -26,44 +26,49 @@ class Preferences {
|
||||
return true;
|
||||
}
|
||||
|
||||
int getChar(const char * key, uint8_t defaultValue = 0) {
|
||||
return 0;
|
||||
}
|
||||
size_t putChar(const char * key, int8_t value) {
|
||||
return 0;
|
||||
}
|
||||
size_t putUChar(const char * key, uint8_t value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t putDouble(const char * key, double value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t getUChar(const char * key, uint8_t defaultValue = 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getChar(const char * key, uint8_t defaultValue = 0) {
|
||||
size_t putUChar(const char * key, uint8_t value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
double getDouble(const char * key, double defaultValue = NAN) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t putString(const char * key, const char * value) {
|
||||
size_t putDouble(const char * key, double value) {
|
||||
return 0;
|
||||
}
|
||||
size_t putString(const char * key, String value) {
|
||||
|
||||
bool getBool(const char * key, bool defaultValue = false) {
|
||||
return true;
|
||||
}
|
||||
size_t putBool(const char * key, bool value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
String getString(const char * key, String defaultValue = String()) {
|
||||
return "";
|
||||
}
|
||||
size_t putString(const char * key, const char * value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t getString(const char * key, char * value, size_t maxLen) {
|
||||
return 0;
|
||||
}
|
||||
String getString(const char * key, String defaultValue = String()) {
|
||||
return "";
|
||||
size_t putString(const char * key, String value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// unused
|
||||
// unused....
|
||||
|
||||
// void end();
|
||||
// bool clear();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
|
||||
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
|
||||
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,12 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#define EMS_TXMODE_OFF 0
|
||||
#define EMS_TXMODE_DEFAULT 1
|
||||
#define EMS_TXMODE_EMSPLUS 2
|
||||
#define EMS_TXMODE_HT3 3
|
||||
#define EMS_TXMODE_HW 4
|
||||
|
||||
namespace emsesp {
|
||||
|
||||
#define EMS_TX_STATUS_ERR 0
|
||||
|
||||
4
lib_standalone/esp32-psram.h
Normal file
4
lib_standalone/esp32-psram.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define stringPSRAM std::string
|
||||
#define AllocatorPSRAM std::allocator
|
||||
Reference in New Issue
Block a user