Merge branch 'mega' into build/ESP32_IDF4.4

This commit is contained in:
TD-er
2022-02-14 23:09:31 +01:00
committed by GitHub
41 changed files with 144 additions and 81 deletions
+2 -2
View File
@@ -297,11 +297,11 @@ class I2Cdev {
//#define _SFR_BYTE(sfr) _MMIO_BYTE(_SFR_ADDR(sfr))
#ifndef sbi // set bit
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= (1 << bit))
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= (1 << (bit)))
#endif // sbi
#ifndef cbi // clear bit
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~(1 << bit))
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~(1 << (bit)))
#endif // cbi
extern TwoWire Wire;
-1
View File
@@ -82,7 +82,6 @@ extra_scripts = tools/pio/gzip-firmware.py
[common]
lib_ldf_mode = deep+
lib_archive = false
framework = arduino
upload_speed = 115200
+3
View File
@@ -68,6 +68,7 @@ build_flags = ${esp82xx_2_6_x.build_flags}
-DCORE_POST_3_0_0
-Wno-deprecated-declarations
-Werror=return-type
-DFS_NO_GLOBALS
lib_ignore = ${esp82xx_defaults.lib_ignore}
@@ -116,6 +117,7 @@ platform_packages =
build_flags = ${esp82xx_2_6_x.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
-Wno-deprecated-declarations
lib_ignore = ${esp82xx_defaults.lib_ignore}, IRremoteESP8266, HeatpumpIR, LittleFS(esp8266), ServoESP32, TinyWireM
; Core with alternative WiFi for nodes not running stable wifi or slow network response
; e.g. Sonoff Basic R2.
@@ -127,6 +129,7 @@ platform_packages =
build_flags = ${esp82xx_2_6_x.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122
-Wno-deprecated-declarations
lib_ignore = ${esp82xx_defaults.lib_ignore}, IRremoteESP8266, HeatpumpIR, LittleFS(esp8266), ServoESP32, TinyWireM
[core_3_0_2]
extends = esp82xx_3_0_x
+7 -7
View File
@@ -34,7 +34,7 @@ lib_ignore = ${core_stage.lib_ignore}
lib_ignore = IRremoteESP8266, HeatpumpIR
[no_sd]
lib_ignore = SD(esp8266), SDFS
lib_ignore = SD(esp8266), SD, SDFS
[no_littlefs]
lib_ignore = LittleFS(esp8266)
@@ -49,7 +49,7 @@ build_flags = ${debug_flags.build_flags}
-DHTTPCLIENT_1_1_COMPATIBLE=0
build_unflags = -DDEBUG_ESP_PORT
-fexceptions
lib_deps = td-er/ESPeasySerial @ 2.0.8, I2Cdevlib-Core, adafruit/Adafruit ILI9341 @ ^1.5.6, Adafruit GFX Library, LOLIN_EPD, adafruit/Adafruit BusIO @ ^1.10.0, bblanchon/ArduinoJson @ ^6.17.2, VL53L0X @ 1.3.0, SparkFun VL53L1X 4m Laser Distance Sensor @ 1.2.9, td-er/RABurton ESP8266 Mutex @ ^1.0.2, td-er/SparkFun MAX1704x Fuel Gauge Arduino Library @ ^1.0.1, ESP8266HTTPUpdateServer, FrogmoreScd30, Multi Channel Relay Arduino Library, SparkFun ADXL345 Arduino Library, ITG3205
lib_deps = td-er/ESPeasySerial @ 2.0.8, I2Cdevlib-Core, ESP8266WebServer, adafruit/Adafruit ILI9341 @ ^1.5.6, Adafruit GFX Library, LOLIN_EPD, adafruit/Adafruit BusIO @ ^1.10.0, bblanchon/ArduinoJson @ ^6.17.2, VL53L0X @ 1.3.0, SparkFun VL53L1X 4m Laser Distance Sensor @ 1.2.9, td-er/RABurton ESP8266 Mutex @ ^1.0.2, td-er/SparkFun MAX1704x Fuel Gauge Arduino Library @ ^1.0.1, ESP8266HTTPUpdateServer, FrogmoreScd30, Multi Channel Relay Arduino Library, SparkFun ADXL345 Arduino Library, ITG3205
lib_ignore = ${esp82xx_defaults.lib_ignore}, IRremoteESP8266, HeatpumpIR, LittleFS(esp8266), ServoESP32, TinyWireM
monitor_filters = esp8266_exception_decoder
extra_scripts = pre:tools/pio/pre_default_check.py
@@ -65,20 +65,20 @@ extra_scripts = pre:tools/pio/pre_default_check.py
platform = ${regular_platform.platform}
platform_packages = ${regular_platform.platform_packages}
build_flags = ${regular_platform.build_flags}
lib_ignore = ${regular_platform.lib_ignore} SD(esp8266), SDFS
lib_ignore = ${regular_platform.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
[normal_alt_wifi]
platform = ${regular_platform_alt_wifi.platform}
platform_packages = ${regular_platform_alt_wifi.platform_packages}
build_flags = ${regular_platform_alt_wifi.build_flags}
lib_ignore = ${regular_platform_alt_wifi.lib_ignore} SD(esp8266), SDFS
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
[normal_beta]
platform = ${beta_platform.platform}
platform_packages = ${beta_platform.platform_packages}
build_flags = ${beta_platform.build_flags}
lib_ignore = ${beta_platform.lib_ignore} SD(esp8266), SDFS
lib_ignore = ${beta_platform.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
;;; TEST *************************************************************
@@ -116,13 +116,13 @@ lib_ignore = ${beta_platform.lib_ignore}
platform = ${regular_platform.platform}
platform_packages = ${regular_platform.platform_packages}
build_flags = ${regular_platform.build_flags}
lib_ignore = ESP32_ping, ESP32WebServer, ServoESP32, ESP32HTTPUpdateServer, SD(esp8266), SDFS, LittleFS(esp8266)
lib_ignore = ESP32_ping, ESP32WebServer, ServoESP32, ESP32HTTPUpdateServer, SD(esp8266), SD, SDFS, LittleFS(esp8266)
[ir_alt_wifi]
platform = ${regular_platform_alt_wifi.platform}
platform_packages = ${regular_platform_alt_wifi.platform_packages}
build_flags = ${regular_platform_alt_wifi.build_flags}
lib_ignore = ESP32_ping, ESP32WebServer, ServoESP32, ESP32HTTPUpdateServer, SD(esp8266), SDFS, LittleFS(esp8266)
lib_ignore = ${ir.lib_ignore}
[minimal_ir]
+21 -13
View File
@@ -199,6 +199,8 @@ platform = ${regular_platform_alt_wifi.platform}
platform_packages = ${regular_platform_alt_wifi.platform_packages}
build_flags = ${regular_platform_alt_wifi.build_flags}
${esp8266_1M.build_flags}
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
;[env:normal_302_ESP8266_1M]
;extends = esp8266_1M
@@ -223,6 +225,8 @@ platform_packages = ${regular_platform_alt_wifi.platform_packages}
build_flags = ${regular_platform_alt_wifi.build_flags}
${esp8266_1M.build_flags}
-D FEATURE_ADC_VCC=true
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
; NORMAL: 1024k for esp8285 ----------------------
@@ -265,6 +269,8 @@ platform = ${regular_platform_alt_wifi.platform}
platform_packages = ${regular_platform_alt_wifi.platform_packages}
build_flags = ${regular_platform_alt_wifi.build_flags}
${esp8266_4M1M.build_flags}
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}, SD(esp8266), SD, SDFS, LittleFS(esp8266)
@@ -274,6 +280,7 @@ platform = ${core_3_0_2.platform}
platform_packages = ${core_3_0_2.platform_packages}
build_flags = ${core_3_0_2.build_flags}
${esp8266_4M1M.build_flags}
lib_ignore = ${core_3_0_2.lib_ignore}, SD, SDFS, LittleFS(esp8266)
[env:normal_beta_ESP8266_4M1M]
extends = esp8266_4M1M
@@ -281,6 +288,7 @@ platform = ${normal_beta.platform}
platform_packages = ${normal_beta.platform_packages}
build_flags = ${normal_beta.build_flags}
${esp8266_4M1M.build_flags}
lib_ignore = ${normal_beta.lib_ignore}, SD, SDFS, LittleFS(esp8266)
; NORMAL: 16M version --- LittleFS --------------
; LittleFS is determined by using "LittleFS" in the pio env name
@@ -291,7 +299,7 @@ platform_packages = ${normal_beta.platform_packages}
build_flags = ${normal_beta.build_flags}
${esp8266_16M.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22y
lib_ignore = ESP32_ping, ESP32WebServer, ServoESP32, ESP32HTTPUpdateServer, IRremoteESP8266, HeatpumpIR
lib_ignore = ESP32_ping, ESP32WebServer, ServoESP32, ESP32HTTPUpdateServer, IRremoteESP8266, HeatpumpIR, SD, SDFS
@@ -384,9 +392,9 @@ build_flags = ${core_3_0_2.build_flags}
; Minimal set of other plugins
[env:minimal_IRext_ESP8266_1M]
extends = esp8266_1M
platform = ${minimal_ir_extended.platform}
platform_packages = ${minimal_ir_extended.platform_packages}
lib_ignore = ${minimal_ir_extended.lib_ignore}
platform = ${ir.platform}
platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_1M.build_flags}
build_unflags = ${esp8266_1M_OTA.build_unflags} -DPLUGIN_BUILD_NORMAL_IR
@@ -398,18 +406,18 @@ build_unflags = ${esp8266_1M_OTA.build_unflags} -DPLUGIN_BUILD_NORMA
; 4M flash, 1M SPIFFS
[env:minimal_IRext_ESP8266_4M1M]
extends = esp8266_4M1M
platform = ${minimal_ir_extended.platform}
platform_packages = ${minimal_ir_extended.platform_packages}
lib_ignore = ${minimal_ir_extended.lib_ignore}
platform = ${ir.platform}
platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_4M1M.build_flags}
; 4M flash, 2M SPIFFS
[env:minimal_IRext_ESP8266_4M2M]
extends = esp8266_4M2M
platform = ${minimal_ir_extended.platform}
platform_packages = ${minimal_ir_extended.platform_packages}
lib_ignore = ${minimal_ir_extended.lib_ignore}
platform = ${ir.platform}
platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_4M2M.build_flags}
@@ -420,9 +428,9 @@ build_flags = ${minimal_ir_extended.build_flags}
; 4M flash, 2M SPIFFS
[env:normal_IRext_no_rx_ESP8266_4M2M]
extends = esp8266_4M2M
platform = ${normal_ir_extended_no_rx.platform}
platform_packages = ${normal_ir_extended_no_rx.platform_packages}
lib_ignore = ${normal_ir_extended_no_rx.lib_ignore}
platform = ${ir.platform}
platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${normal_ir_extended_no_rx.build_flags}
${esp8266_4M2M.build_flags}
-DLIMIT_BUILD_SIZE
+1 -1
View File
@@ -43,7 +43,7 @@ build_flags = ${beta_platform.build_flags}
${debug_pio.build_flags}
${esp8266_4M1M.build_flags}
-DPLUGIN_BUILD_CUSTOM
lib_ignore = ${regular_platform.lib_ignore}, IRremoteESP8266, HeatpumpIR, SD(esp8266), SDFS, LittleFS(esp8266)
lib_ignore = ${regular_platform.lib_ignore}, IRremoteESP8266, HeatpumpIR, SD(esp8266), SD, SDFS, LittleFS(esp8266)
extra_scripts = ${extra_scripts_esp8266.extra_scripts}
+3 -2
View File
@@ -66,7 +66,9 @@ namespace std
#include "src/Globals/RamTracker.h"
#define FS_NO_GLOBALS
#ifndef FS_NO_GLOBALS
#define FS_NO_GLOBALS
#endif
#if defined(ESP8266)
#ifndef CORE_POST_3_0_0
@@ -142,7 +144,6 @@ namespace std
#include <esp_wifi.h> // Needed to call ESP-IDF functions like esp_wifi_....
#endif
#ifdef USE_LITTLEFS
#ifdef ESP32
#if ESP_IDF_VERSION_MAJOR >= 4
+1 -1
View File
@@ -360,7 +360,7 @@ boolean Plugin_099(uint8_t function, struct EventStruct *event, String& string)
addHtmlError(error);
}
#ifdef PLUGIN_099_DEBUG
if (logLevelActiveFor(LOG_LEVEL_INFO)) {
if (loglevelActiveFor(LOG_LEVEL_INFO)) {
String log = F("p099_data save size: ");
log += sizeof(P099_data->StoredSettings);
addLogMove(LOG_LEVEL_INFO, log);
+17 -11
View File
@@ -99,9 +99,22 @@ volatile bool PLUGIN_118_Int = false;
#define PLUGIN_VALUENAME3_118 "LastIDindex"
// Timer values for hardware timer in Fan in seconds
#define PLUGIN_118_Time1 10 * 60
#define PLUGIN_118_Time2 20 * 60
#define PLUGIN_118_Time3 30 * 60
#define PLUGIN_118_Time1 (10 * 60)
#define PLUGIN_118_Time2 (20 * 60)
#define PLUGIN_118_Time3 (30 * 60)
// Forward declarations
void PLUGIN_118_ITHOcheck();
void PLUGIN_118_Publishdata(struct EventStruct *event);
void PLUGIN_118_PluginWriteLog(const String& command);
ICACHE_RAM_ATTR void PLUGIN_118_ITHOinterrupt()
{
PLUGIN_118_Int = true; // flag
// PLUGIN_118_Int_time = millis(); //used to register time since interrupt, to make sure we don't read within 10 ms as the RX buffer needs
// some time to get ready. Update: Disabled as it appear not necessary
}
boolean Plugin_118(byte function, struct EventStruct *event, String& string)
{
@@ -420,13 +433,6 @@ boolean Plugin_118(byte function, struct EventStruct *event, String& string)
return success;
}
ICACHE_RAM_ATTR void PLUGIN_118_ITHOinterrupt()
{
PLUGIN_118_Int = true; // flag
// PLUGIN_118_Int_time = millis(); //used to register time since interrupt, to make sure we don't read within 10 ms as the RX buffer needs
// some time to get ready. Update: Disabled as it appear not necessary
}
void PLUGIN_118_ITHOcheck()
{
#ifndef BUILD_NO_DEBUG
@@ -564,7 +570,7 @@ void PLUGIN_118_Publishdata(struct EventStruct *event)
#ifndef BUILD_NO_DEBUG
if (logLevelActiveFor(LOG_LEVEL_DEBUG)) {
if (loglevelActiveFor(LOG_LEVEL_DEBUG)) {
String log = F("State: ");
log += UserVar[event->BaseVarIndex];
addLogMove(LOG_LEVEL_DEBUG, log);
+1
View File
@@ -26,6 +26,7 @@
#include "src/Globals/Plugins.h"
#include "src/Globals/RuntimeData.h"
#include "src/Globals/Settings.h"
#include "src/Globals/Services.h"
#include "src/Helpers/_Plugin_init.h"
#include "src/Helpers/ESPEasy_math.h"
+1 -1
View File
@@ -13,7 +13,7 @@
#include <SD.h>
void printDirectory(File dir, int numTabs)
void printDirectory(fs::File dir, int numTabs)
{
while (true) {
File entry = dir.openNextFile();
+1 -1
View File
@@ -6,7 +6,7 @@
#include <FS.h>
void printDirectory(File dir, int numTabs);
void printDirectory(fs::File dir, int numTabs);
const __FlashStringHelper * Command_SD_LS(struct EventStruct *event, const char* Line);
String Command_SD_Remove(struct EventStruct *event, const char* Line);
@@ -86,9 +86,9 @@ private:
RTC_cache_struct RTC_cache;
std::vector<uint8_t>RTC_cache_data;
#endif
File fw;
File fr;
File fp;
fs::File fw;
fs::File fr;
fs::File fp;
size_t peekfilenr = 0;
size_t peekreadpos = 0;
+1
View File
@@ -25,6 +25,7 @@
#include <math.h>
#include <vector>
boolean activeRuleSets[RULESETS_MAX];
-2
View File
@@ -5,11 +5,9 @@
#if defined(ESP8266)
# include <ESP8266WiFi.h>
# include <ESP8266WebServer.h>
#endif // if defined(ESP8266)
#if defined(ESP32)
# include <WiFi.h>
# include <WebServer.h>
#endif // if defined(ESP32)
#include "../DataTypes/WiFiConnectionProtocol.h"
@@ -13,6 +13,12 @@
#include "../Helpers/Networking.h"
#ifdef FEATURE_ARDUINO_OTA
#include "../Helpers/OTA.h"
#endif
/*********************************************************************************************\
* run background tasks
\*********************************************************************************************/
@@ -80,7 +86,7 @@ void backgroundtasks()
#ifdef FEATURE_ARDUINO_OTA
if (Settings.ArduinoOTAEnable) {
ArduinoOTA.handle();
ArduinoOTA_handle();
}
// once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
@@ -88,7 +94,7 @@ void backgroundtasks()
{
delay(0);
ArduinoOTA.handle();
ArduinoOTA_handle();
}
#endif // ifdef FEATURE_ARDUINO_OTA
+3 -1
View File
@@ -12,7 +12,7 @@ nprotocolIndex_t INVALID_NPROTOCOL_INDEX = NPLUGIN_MAX;
bool (*NPlugin_ptr[NPLUGIN_MAX])(NPlugin::Function,
struct EventStruct *,
String&);
npluginID_t NPlugin_id[NPLUGIN_MAX];
npluginID_t NPlugin_id[NPLUGIN_MAX] = { INVALID_N_PLUGIN_ID };
NotificationStruct Notification[NPLUGIN_MAX];
@@ -110,6 +110,8 @@ bool addNPlugin(npluginID_t npluginID, nprotocolIndex_t x) {
// FIXME TD-er: Must add lookup for notification plugins too
// ProtocolIndex_to_NPlugin_id[x] = npluginID;
// NPlugin_id_to_ProtocolIndex[npluginID] = x;
NPlugin_id[x] = npluginID;
return true;
}
/*
+1 -1
View File
@@ -29,7 +29,7 @@
#include "../Helpers/StringConverter.h"
#include "../Helpers/StringParser.h"
#include <vector>
int deviceCount = -1;
+12 -7
View File
@@ -51,18 +51,23 @@ void checkRAM(const __FlashStringHelper * descr ) {
void checkRAM(const String& descr ) {
if (Settings.EnableRAMTracking())
myRamTracker.registerRamState(descr);
uint32_t freeRAM = FreeMem();
const uint32_t freeStack = getFreeStackWatermark();
if (freeStack <= lowestFreeStack) {
lowestFreeStack = freeStack;
lowestFreeStackfunction = descr;
}
#ifdef ESP32
const uint32_t freeRAM = ESP.getMinFreeHeap();
#else
const uint32_t freeRAM = FreeMem();
#endif
if (freeRAM <= lowestRAM)
{
lowestRAM = freeRAM;
lowestRAMfunction = std::move(descr);
}
uint32_t freeStack = getFreeStackWatermark();
if (freeStack <= lowestFreeStack) {
lowestFreeStack = freeStack;
lowestFreeStackfunction = std::move(descr);
}
}
+7 -7
View File
@@ -3,13 +3,6 @@
#include "../../ESPEasy_common.h"
#ifdef FEATURE_ARDUINO_OTA
//enable Arduino OTA updating.
//Note: This adds around 10kb to the firmware size, and 1kb extra ram.
#include <ArduinoOTA.h>
extern bool ArduinoOTAtriggered;
#endif
#ifdef FEATURE_MDNS
//enable mDNS mode (adds about 6kb ram and some bytes IRAM)
@@ -49,6 +42,13 @@
#endif
#ifdef FEATURE_ARDUINO_OTA
//enable Arduino OTA updating.
//Note: This adds around 10kb to the firmware size, and 1kb extra ram.
extern bool ArduinoOTAtriggered;
#endif
#ifdef FEATURE_DNS_SERVER
#include <DNSServer.h>
extern DNSServer dnsServer;
+1
View File
@@ -14,6 +14,7 @@
# define ESP32interrupts() portEXIT_CRITICAL(&mux); }
#endif // if defined(ESP32)
#include <vector>
unsigned char ROM_NO[8];
uint8_t LastDiscrepancy;
+3 -3
View File
@@ -1515,7 +1515,7 @@ bool getCacheFileCounters(uint16_t& lowest, uint16_t& highest, size_t& filesizeH
highest = 0;
filesizeHighest = 0;
#ifdef ESP8266
Dir dir = ESPEASY_FS.openDir(F("cache"));
fs::Dir dir = ESPEASY_FS.openDir(F("cache"));
while (dir.next()) {
String filename = dir.fileName();
@@ -1534,8 +1534,8 @@ bool getCacheFileCounters(uint16_t& lowest, uint16_t& highest, size_t& filesizeH
}
#endif // ESP8266
#ifdef ESP32
File root = ESPEASY_FS.open(F("/"));
File file = root.openNextFile();
fs::File root = ESPEASY_FS.open(F("/"));
fs::File file = root.openNextFile();
while (file)
{
+4
View File
@@ -807,7 +807,9 @@ bool ESPEasy_time::ExtRTC_set(uint32_t unixtime)
// Do not adjust the external RTC time if we already used it as a time source.
return true;
}
#ifdef USE_EXT_RTC
bool timeAdjusted = false;
#endif
switch (Settings.ExtTimeSource()) {
case ExtTimeSource_e::None:
return false;
@@ -860,12 +862,14 @@ bool ESPEasy_time::ExtRTC_set(uint32_t unixtime)
break;
}
}
#ifdef USE_EXT_RTC
if (timeAdjusted) {
String log = F("ExtRTC: External time source set to: ");
log += unixtime;
addLogMove(LOG_LEVEL_INFO, log);
return true;
}
#endif
addLog(LOG_LEVEL_ERROR, F("ExtRTC: Cannot set time to external time source"));
return false;
}
+3 -1
View File
@@ -8,7 +8,9 @@
// Macro used to make file system operations a bit more readable.
#define SPIFFS_CHECK(result, fname) if (!(result)) { return(FileError(__LINE__, fname)); }
#define FS_NO_GLOBALS
#ifndef FS_NO_GLOBALS
#define FS_NO_GLOBALS
#endif
#if defined(ESP8266)
extern "C" {
#include <spi_flash.h>
+5
View File
@@ -44,6 +44,11 @@
#endif
#ifdef FEATURE_SD
#include <SD.h>
#endif
/********************************************************************************************\
* Initialize specific hardware settings (only global ones, others are set through devices)
\*********************************************************************************************/
-3
View File
@@ -13,9 +13,6 @@
#include "../../ESPEasy_common.h"
#ifdef FEATURE_SD
#include <SD.h>
#endif
/********************************************************************************************\
* Initialize specific hardware settings (only global ones, others are set through devices)
+4
View File
@@ -14,6 +14,10 @@
#include "../Helpers/StringConverter.h"
#include "../Helpers/StringParser.h"
#ifdef FEATURE_SD
#include <SD.h>
#endif
bool remoteConfig(struct EventStruct *event, const String& string)
{
-4
View File
@@ -10,10 +10,6 @@
#include "../../ESPEasy_common.h"
#ifdef FEATURE_SD
#include <SD.h>
#endif
bool remoteConfig(struct EventStruct *event,
const String & string);
+1
View File
@@ -64,6 +64,7 @@ void etharp_gratuitous_r(struct netif *netif) {
# endif // ifdef ESP32
#endif // USE_SETTINGS_ARCHIVE
#include <vector>
/*********************************************************************************************\
Syslog client
+12
View File
@@ -8,6 +8,13 @@
#include "../Helpers/Hardware.h"
#include "../Helpers/Misc.h"
#ifdef FEATURE_ARDUINO_OTA
//enable Arduino OTA updating.
//Note: This adds around 10kb to the firmware size, and 1kb extra ram.
#include <ArduinoOTA.h>
#endif
bool OTA_possible(uint32_t& maxSketchSize, bool& use2step) {
#if defined(ESP8266)
@@ -106,4 +113,9 @@ void ArduinoOTAInit()
}
}
void ArduinoOTA_handle()
{
ArduinoOTA.handle();
}
#endif // ifdef FEATURE_ARDUINO_OTA
+2
View File
@@ -14,6 +14,8 @@ bool OTA_possible(uint32_t& maxSketchSize,
void ArduinoOTAInit();
void ArduinoOTA_handle();
#endif // ifdef FEATURE_ARDUINO_OTA
+2 -2
View File
@@ -263,7 +263,7 @@ void addNewLine(String& line) {
line += F("\r\n");
}
size_t UTF8_charLength(char firstByte) {
size_t UTF8_charLength(uint8_t firstByte) {
if (firstByte <= 0x7f) {
return 1;
}
@@ -291,7 +291,7 @@ size_t UTF8_charLength(char firstByte) {
void replaceUnicodeByChar(String& line, char replChar) {
size_t pos = 0;
while (pos < line.length()) {
const size_t charLength = UTF8_charLength(line[pos]);
const size_t charLength = UTF8_charLength((uint8_t)line[pos]);
if (charLength > 1) {
// Is unicode char in UTF-8 format
+1 -1
View File
@@ -96,7 +96,7 @@ void removeExtraNewLine(String& line);
void addNewLine(String& line);
size_t UTF8_charLength(char firstByte);
size_t UTF8_charLength(uint8_t firstByte);
void replaceUnicodeByChar(String& line, char replChar);
+1
View File
@@ -12,6 +12,7 @@
#include "../ESPEasyCore/ESPEasyNetwork.h"
#include "../Globals/CPlugins.h"
#include "../Globals/ESPEasy_Scheduler.h"
#include "../Globals/Services.h"
#include "../Helpers/_CPlugin_init.h"
#include "../Helpers/Misc.h"
#include "../Helpers/Network.h"
+2
View File
@@ -6,6 +6,8 @@
# include <IRremoteESP8266.h>
#include <vector>
# define PLUGIN_016_DEBUG // additional debug messages in the log
// bit definition in PCONFIG_LONG(0)
@@ -9,6 +9,7 @@
#ifdef USES_P087
#include <vector>
P087_data_struct::P087_data_struct() : easySerial(nullptr) {}
+2
View File
@@ -17,6 +17,8 @@
# include "../Helpers/Misc.h"
# include "../Helpers/StringParser.h"
# include <vector>
# if defined(PLUGIN_SET_MAX) || defined(PLUGIN_BUILD_CUSTOM)
# define P104_USE_NUMERIC_DOUBLEHEIGHT_FONT // Enables double height numeric font for double-height time/date
# endif // if defined(PLUGIN_SET_MAX) || defined(PLUGIN_BUILD_CUSTOM)
+2
View File
@@ -6,6 +6,8 @@
# include "../Globals/EventQueue.h"
# include <vector>
# include <Wire.h> // Needed for I2C
// https://github.com/sparkfun/SparkFun_ADXL345_Arduino_Library
# include <SparkFun_ADXL345.h>
+4
View File
@@ -19,6 +19,10 @@
#include "../Globals/C016_ControllerCache.h"
#endif
#ifdef FEATURE_SD
#include <SD.h>
#endif
#ifdef WEBSERVER_NEW_UI
-4
View File
@@ -3,10 +3,6 @@
#include "../WebServer/common.h"
#ifdef FEATURE_SD
#include <SD.h>
#endif
#ifdef WEBSERVER_NEW_UI
+1
View File
@@ -8,6 +8,7 @@
#ifdef WEBSERVER_I2C_SCANNER
#ifdef FEATURE_I2CMULTIPLEXER
#include <vector>
typedef std::vector<bool> i2c_addresses_t;
#endif