mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-10-27 06:21:26 +00:00
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into feature/p131-neopixel-matrix-display
This commit is contained in:
commit
6eb7a07589
10 files changed
+93
-59
No files matched your search
@@ -130,21 +130,36 @@ platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
-DPLUGIN_BUILD_TESTING
|
||||
-DLIMIT_BUILD_SIZE
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
|
||||
[testing_alt_wifi]
|
||||
platform = ${regular_platform_alt_wifi.platform}
|
||||
platform_packages = ${regular_platform_alt_wifi.platform_packages}
|
||||
build_flags = ${regular_platform_alt_wifi.build_flags}
|
||||
-DPLUGIN_BUILD_TESTING
|
||||
-DLIMIT_BUILD_SIZE
|
||||
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
[testing_beta]
|
||||
platform = ${beta_platform.platform}
|
||||
platform_packages = ${beta_platform.platform_packages}
|
||||
build_flags = ${beta_platform.build_flags}
|
||||
-DPLUGIN_BUILD_TESTING
|
||||
-DLIMIT_BUILD_SIZE
|
||||
lib_ignore = ${beta_platform.lib_ignore}
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
|
||||
;;; IR ***********************************************************
|
||||
@@ -203,8 +218,7 @@ build_flags = ${ir.build_flags}
|
||||
; *********************************************************************
|
||||
[esp82xx_1M]
|
||||
extends = esp82xx_common
|
||||
build_flags = -DSIZE_1M
|
||||
-DBUILD_NO_DEBUG
|
||||
build_flags = -DBUILD_NO_DEBUG
|
||||
-Os
|
||||
-s
|
||||
${esp82xx_common.build_flags}
|
||||
@@ -212,11 +226,12 @@ build_flags = -DSIZE_1M
|
||||
[esp8266_1M]
|
||||
extends = esp82xx_1M
|
||||
board = esp8266_1M128k
|
||||
build_flags = ${esp82xx_1M.build_flags}
|
||||
|
||||
[esp8285_1M]
|
||||
extends = esp82xx_1M
|
||||
board = esp8285_1M128k
|
||||
build_flags = ${esp8266_1M.build_flags}
|
||||
build_flags = ${esp82xx_1M.build_flags}
|
||||
-DESP8285
|
||||
|
||||
|
||||
@@ -233,6 +248,7 @@ build_flags = ${esp82xx_1M.build_flags}
|
||||
[esp8266_1M_OTA]
|
||||
extends = esp82xx_1M_OTA
|
||||
board = esp8266_1M128k_OTA
|
||||
build_flags = ${esp82xx_1M_OTA.build_flags}
|
||||
|
||||
[esp8285_1M_OTA]
|
||||
extends = esp82xx_1M_OTA
|
||||
@@ -248,6 +264,7 @@ build_flags = ${esp82xx_1M_OTA.build_flags}
|
||||
[esp8266_2M256]
|
||||
extends = esp82xx_common
|
||||
board = esp8266_2M256
|
||||
build_flags = ${esp82xx_common.build_flags}
|
||||
|
||||
[espWroom2M256]
|
||||
extends = esp82xx_common
|
||||
@@ -255,7 +272,7 @@ board_build.flash_mode = dout
|
||||
board_upload.maximum_size = 1044464
|
||||
board = esp_wroom_02
|
||||
board_build.ldscript = eagle.flash.2m256.ld
|
||||
|
||||
build_flags = ${esp82xx_common.build_flags}
|
||||
|
||||
;;; 4MB flash nodes **************************************************
|
||||
; Layout for 4M flash nodes ;
|
||||
@@ -264,10 +281,12 @@ board_build.ldscript = eagle.flash.2m256.ld
|
||||
[esp8266_4M1M]
|
||||
extends = esp82xx_common
|
||||
board = esp8266_4M1M_board
|
||||
build_flags = ${esp82xx_common.build_flags}
|
||||
|
||||
[esp8266_4M2M]
|
||||
extends = esp82xx_common
|
||||
board = esp8266_4M2M_board
|
||||
build_flags = ${esp82xx_common.build_flags}
|
||||
|
||||
|
||||
|
||||
|
||||
+45
-37
@@ -210,6 +210,12 @@ platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
|
||||
[env:normal_alt_wifi_ESP8266_1M]
|
||||
extends = esp8266_1M
|
||||
@@ -239,6 +245,11 @@ platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-D FEATURE_ADC_VCC=true
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
[env:normal_alt_wifi_ESP8266_1M_VCC]
|
||||
extends = esp8266_1M
|
||||
@@ -262,6 +273,12 @@ platform = ${regular_platform.platform}
|
||||
platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8285_1M.build_flags}
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
|
||||
|
||||
|
||||
; NORMAL: 2048k WROOM02 version 256k SPIFFS --------------------------
|
||||
@@ -545,11 +562,8 @@ build_flags = ${testing_ESP8266_4M1M.build_flags}
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_E_ESP8266_4M1M]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${testing.platform}
|
||||
platform_packages = ${testing.platform_packages}
|
||||
build_flags = ${testing.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
extends = testing_ESP8266_4M1M
|
||||
build_flags = ${testing_ESP8266_4M1M.build_flags}
|
||||
-DPLUGIN_BUILD_TESTING_E
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
@@ -582,46 +596,40 @@ build_flags = ${testing_ESP8266_4M1M.build_flags}
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_E_ESP8266_4M1M_VCC]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${testing.platform}
|
||||
platform_packages = ${testing.platform_packages}
|
||||
build_flags = ${testing.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
extends = testing_ESP8266_4M1M
|
||||
build_flags = ${testing_ESP8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
-DPLUGIN_BUILD_TESTING_E
|
||||
-DTESTING_USE_RTTTL
|
||||
|
||||
[env:test_A_alt_wifi_ESP8266_4M1M_VCC]
|
||||
extends = testing_alt_wifi_ESP8266_4M1M
|
||||
build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
;[env:test_A_alt_wifi_ESP8266_4M1M_VCC]
|
||||
;extends = testing_alt_wifi_ESP8266_4M1M
|
||||
;build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
; -DFEATURE_ADC_VCC=true
|
||||
|
||||
[env:test_B_alt_wifi_ESP8266_4M1M_VCC]
|
||||
extends = testing_alt_wifi_ESP8266_4M1M
|
||||
build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
-DPLUGIN_BUILD_TESTING_B
|
||||
;[env:test_B_alt_wifi_ESP8266_4M1M_VCC]
|
||||
;extends = testing_alt_wifi_ESP8266_4M1M
|
||||
;build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
; -DFEATURE_ADC_VCC=true
|
||||
; -DPLUGIN_BUILD_TESTING_B
|
||||
|
||||
[env:test_C_alt_wifi_ESP8266_4M1M_VCC]
|
||||
extends = testing_alt_wifi_ESP8266_4M1M
|
||||
build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
-DPLUGIN_BUILD_TESTING_C
|
||||
;[env:test_C_alt_wifi_ESP8266_4M1M_VCC]
|
||||
;extends = testing_alt_wifi_ESP8266_4M1M
|
||||
;build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
; -DFEATURE_ADC_VCC=true
|
||||
; -DPLUGIN_BUILD_TESTING_C
|
||||
|
||||
[env:test_D_alt_wifi_ESP8266_4M1M_VCC]
|
||||
extends = testing_alt_wifi_ESP8266_4M1M
|
||||
build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
-DPLUGIN_BUILD_TESTING_D
|
||||
;[env:test_D_alt_wifi_ESP8266_4M1M_VCC]
|
||||
;extends = testing_alt_wifi_ESP8266_4M1M
|
||||
;build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
; -DFEATURE_ADC_VCC=true
|
||||
; -DPLUGIN_BUILD_TESTING_D
|
||||
|
||||
[env:test_E_alt_wifi_ESP8266_4M1M_VCC]
|
||||
extends = esp8266_4M1M
|
||||
platform = ${testing_alt_wifi.platform}
|
||||
platform_packages = ${testing_alt_wifi.platform_packages}
|
||||
build_flags = ${testing_alt_wifi.build_flags}
|
||||
${esp8266_4M1M.build_flags}
|
||||
-DFEATURE_ADC_VCC=true
|
||||
-DPLUGIN_BUILD_TESTING_E
|
||||
;[env:test_E_alt_wifi_ESP8266_4M1M_VCC]
|
||||
;extends = testing_alt_wifi_ESP8266_4M1M
|
||||
;build_flags = ${testing_alt_wifi_ESP8266_4M1M.build_flags}
|
||||
; -DFEATURE_ADC_VCC=true
|
||||
; -DPLUGIN_BUILD_TESTING_E
|
||||
|
||||
|
||||
; TEST: 4096k version + FEATURE_ADC_VCC + FEATURE_MDNS + FEATURE_SD ----------
|
||||
|
||||
+14
-9
@@ -247,10 +247,13 @@ boolean Plugin_003(uint8_t function, struct EventStruct *event, String& string)
|
||||
static_cast<P003_data_struct *>(getPluginTaskData(event->TaskIndex));
|
||||
|
||||
if (nullptr != P003_data) {
|
||||
String command = parseString(string, 1);
|
||||
const String command = parseString(string, 1);
|
||||
bool mustCallPluginRead = false;
|
||||
|
||||
if ((command == F("resetpulsecounter")) || (command == F("setpulsecountertotal")))
|
||||
const bool cmd_resetpulsecounter = command == F("resetpulsecounter");
|
||||
const bool cmd_setpulsecountertotal = command == F("setpulsecountertotal");
|
||||
|
||||
if (cmd_resetpulsecounter || cmd_setpulsecountertotal)
|
||||
{
|
||||
// Legacy commands ({...} indicate optional parameters):
|
||||
// - {[<TaskName/Number>].}resetpulsecounter
|
||||
@@ -263,7 +266,7 @@ boolean Plugin_003(uint8_t function, struct EventStruct *event, String& string)
|
||||
// Legacy: Allow for an optional taskIndex parameter.
|
||||
uint8_t tidx = 1;
|
||||
|
||||
if (command == F("setpulsecountertotal")) { tidx = 2; }
|
||||
if (cmd_setpulsecountertotal) { tidx = 2; }
|
||||
|
||||
if (!pluginOptionalTaskIndexArgumentMatch(event->TaskIndex, string, tidx)) {
|
||||
break;
|
||||
@@ -271,12 +274,12 @@ boolean Plugin_003(uint8_t function, struct EventStruct *event, String& string)
|
||||
|
||||
int par1 = 0;
|
||||
|
||||
if (command == F("setpulsecountertotal")) {
|
||||
if (cmd_setpulsecountertotal) {
|
||||
if (!validIntFromString(parseString(string, 2), par1)) { break; }
|
||||
}
|
||||
P003_data->pulseHelper.setPulseCountTotal(par1);
|
||||
|
||||
if (command == F("resetpulsecounter")) {
|
||||
if (cmd_resetpulsecounter) {
|
||||
P003_data->pulseHelper.resetPulseCounter();
|
||||
}
|
||||
mustCallPluginRead = true;
|
||||
@@ -301,15 +304,17 @@ boolean Plugin_003(uint8_t function, struct EventStruct *event, String& string)
|
||||
// r = reset error and overdue counters after logging
|
||||
// i = increase the log level for regular statstic logs to "info"
|
||||
|
||||
String subcommand = parseString(string, 2);
|
||||
const String subcommand = parseString(string, 2);
|
||||
const bool sub_i = subcommand == F("i");
|
||||
const bool sub_r = subcommand == F("r");
|
||||
|
||||
if ((subcommand == F("i")) || (subcommand == F("r")) || (subcommand == "")) {
|
||||
if ((sub_i) || (sub_r) || (subcommand.isEmpty())) {
|
||||
P003_data->pulseHelper.doStatisticLogging(P003_PULSE_STATS_ADHOC_LOG_LEVEL);
|
||||
P003_data->pulseHelper.doTimingLogging(P003_PULSE_STATS_ADHOC_LOG_LEVEL);
|
||||
|
||||
if (subcommand == F("i")) { P003_data->pulseHelper.setStatsLogLevel(LOG_LEVEL_INFO); }
|
||||
if (sub_i) { P003_data->pulseHelper.setStatsLogLevel(LOG_LEVEL_INFO); }
|
||||
|
||||
if (subcommand == F("r")) { P003_data->pulseHelper.resetStatsErrorVars(); }
|
||||
if (sub_r) { P003_data->pulseHelper.resetStatsErrorVars(); }
|
||||
success = true;
|
||||
}
|
||||
# else // ifdef PULSE_STATISTIC
|
||||
|
||||
@@ -137,8 +137,6 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef MEMORY_ANALYSIS
|
||||
#ifdef MQTT_ONLY
|
||||
#define USES_C002 // Domoticz MQTT
|
||||
@@ -480,7 +478,7 @@ To create/register a plugin, you have to :
|
||||
// The following define is needed for extended decoding of A/C Messages and or using standardised common arguments for controlling all deeply supported A/C units
|
||||
#define P016_P035_Extended_AC
|
||||
#define P016_P035_USE_RAW_RAW2 //Use the RAW and RAW2 encodings, disabling it saves 3.7Kb
|
||||
#ifndef SIZE_1M // Leaving out Heatpump IR for 1M builds because it won't fit after upgrading IRremoteESP8266 library to v2.8.1
|
||||
#ifndef ESP8266_1M // Leaving out Heatpump IR for 1M builds because it won't fit after upgrading IRremoteESP8266 library to v2.8.1
|
||||
#define USES_P088 // ToniA IR plugin
|
||||
#endif
|
||||
#define PLUGIN_SET_ONLY_SWITCH
|
||||
@@ -1675,7 +1673,7 @@ To create/register a plugin, you have to :
|
||||
|
||||
|
||||
// Due to size restrictions, disable a few plugins/controllers for 1M builds
|
||||
#ifdef SIZE_1M
|
||||
#ifdef ESP8266_1M
|
||||
#ifdef USES_C003
|
||||
#undef USES_C003
|
||||
#endif
|
||||
|
||||
@@ -66,6 +66,7 @@ bool getDownloadFiletypeChecked(FileType::Enum filetype, unsigned int filenr) {
|
||||
case FileType::NOTIFICATION_DAT: isChecked = ResetFactoryDefaultPreference.fetchNotificationDat(); break;
|
||||
case FileType::RULES_TXT: isChecked = ResetFactoryDefaultPreference.fetchRulesTXT(filenr); break;
|
||||
case FileType::PROVISIONING_DAT: isChecked = ResetFactoryDefaultPreference.fetchProvisioningDat(); break;
|
||||
break;
|
||||
|
||||
case FileType::MAX_FILETYPE:
|
||||
break;
|
||||
|
||||
@@ -458,6 +458,7 @@ bool PluginCall(uint8_t Function, struct EventStruct *event, String& str)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (Function == PLUGIN_REQUEST) {
|
||||
// @FIXME TD-er: work-around as long as gpio command is still performed in P001_switch.
|
||||
for (deviceIndex_t deviceIndex = 0; deviceIndex < PLUGIN_MAX; deviceIndex++) {
|
||||
@@ -470,6 +471,7 @@ bool PluginCall(uint8_t Function, struct EventStruct *event, String& str)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,9 +165,10 @@ unsigned long ESPEasy_time::now() {
|
||||
// Clock instability in msec/second
|
||||
timeWander = ((time_offset * 1000000.0) / timePassedSince(lastTimeWanderCalculation));
|
||||
}
|
||||
lastTimeWanderCalculation = millis();
|
||||
|
||||
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
|
||||
lastTimeWanderCalculation = prevMillis;
|
||||
|
||||
timeSynced = true;
|
||||
|
||||
sysTime = unixTime_d;
|
||||
|
||||
@@ -350,7 +350,7 @@ void WiFi_AP_CandidatesList::addFromRTC() {
|
||||
|
||||
// See if we may have a better candidate for the current network, with a significant better RSSI.
|
||||
auto bestMatch = candidates.end();
|
||||
auto lastUsed = candidates.end();
|
||||
auto lastUsed = bestMatch;
|
||||
for (auto it = candidates.begin(); lastUsed == candidates.end() && it != candidates.end(); ++it) {
|
||||
if (it->usable() && it->ssid.equals(fromRTC.ssid)) {
|
||||
const bool foundLastUsed = fromRTC.bssid_match(it->bssid);
|
||||
|
||||
@@ -99,7 +99,7 @@ float getLoRaAirTime(uint8_t pl, uint8_t sf, uint16_t bw, uint8_t cr, uint8_t n_
|
||||
}
|
||||
|
||||
// t_symbol and t_air in msec
|
||||
float t_symbol = (1 << sf) / bw;
|
||||
float t_symbol = static_cast<float>(1 << sf) / bw;
|
||||
float t_air = ((n_preamble + 4.25f) + payload_length) * t_symbol;
|
||||
return t_air;
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
// Difference in build size is roughly 4k
|
||||
# define PLUGIN_053_ENABLE_EXTRA_SENSORS
|
||||
|
||||
# if !defined(PLUGIN_BUILD_CUSTOM) && defined(SIZE_1M) && defined(PLUGIN_053_ENABLE_EXTRA_SENSORS) // Turn off for 1M OTA builds
|
||||
# if !defined(PLUGIN_BUILD_CUSTOM) && defined(ESP8266_1M) && defined(PLUGIN_053_ENABLE_EXTRA_SENSORS) // Turn off for 1M OTA builds
|
||||
# undef PLUGIN_053_ENABLE_EXTRA_SENSORS
|
||||
# endif // if defined(SIZE_1M) && defined(PLUGIN_BUILD_MINIMAL_OTA) && defined(PLUGIN_053_ENABLE_EXTRA_SENSORS)
|
||||
# endif // if defined(ESP8266_1M) && defined(PLUGIN_BUILD_MINIMAL_OTA) && defined(PLUGIN_053_ENABLE_EXTRA_SENSORS)
|
||||
|
||||
|
||||
// Do not change values, as they are being stored
|
||||
|
||||
Reference in new issue
Block a user