mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-12 09:36:59 +00:00
[Cleanup] Minor optimizations to reduce build size
This commit is contained in:
@@ -20,6 +20,7 @@ lib_ignore = ESP8266Ping
|
||||
extends = common, core_esp32_IDF4_4__2_0_3
|
||||
lib_deps =
|
||||
Adafruit_ST77xx
|
||||
Adafruit NeoPixel
|
||||
ArduinoOTA
|
||||
ESP32HTTPUpdateServer
|
||||
FrogmoreScd30
|
||||
|
||||
@@ -53,6 +53,7 @@ build_unflags = -DDEBUG_ESP_PORT
|
||||
-fexceptions
|
||||
lib_deps =
|
||||
Adafruit_ST77xx
|
||||
Adafruit NeoPixel
|
||||
ESP8266HTTPUpdateServer
|
||||
ESP8266WebServer
|
||||
FrogmoreScd30
|
||||
|
||||
+2
-2
@@ -106,7 +106,7 @@ volatile bool PLUGIN_118_Int = false;
|
||||
// Forward declarations
|
||||
void PLUGIN_118_ITHOcheck();
|
||||
void PLUGIN_118_Publishdata(struct EventStruct *event);
|
||||
void PLUGIN_118_PluginWriteLog(const String& command);
|
||||
void PLUGIN_118_PluginWriteLog(const __FlashStringHelper * command);
|
||||
|
||||
ICACHE_RAM_ATTR void PLUGIN_118_ITHOinterrupt()
|
||||
{
|
||||
@@ -584,7 +584,7 @@ void PLUGIN_118_Publishdata(struct EventStruct *event)
|
||||
#endif // ifndef BUILD_NO_DEBUG
|
||||
}
|
||||
|
||||
void PLUGIN_118_PluginWriteLog(const String& command)
|
||||
void PLUGIN_118_PluginWriteLog(const __FlashStringHelper * command)
|
||||
{
|
||||
String log = F("Send Itho command for: ");
|
||||
|
||||
|
||||
@@ -1092,10 +1092,7 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// TESTING #####################################
|
||||
#ifdef PLUGIN_SET_TESTING
|
||||
#if defined(PLUGIN_SET_TESTING) || defined(PLUGIN_SET_TESTING_A) || defined(PLUGIN_SET_TESTING_B) || defined(PLUGIN_SET_TESTING_C) || defined(PLUGIN_SET_TESTING_D) || defined(PLUGIN_SET_TESTING_E)
|
||||
#if !defined(PLUGIN_SET_MAX) && !defined(ESP32)
|
||||
#ifndef LIMIT_BUILD_SIZE
|
||||
#define LIMIT_BUILD_SIZE
|
||||
@@ -1103,8 +1100,11 @@ To create/register a plugin, you have to :
|
||||
#ifndef NOTIFIER_SET_NONE
|
||||
#define NOTIFIER_SET_NONE
|
||||
#endif
|
||||
#endif // PLUGIN_SET_MAX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// TESTING #####################################
|
||||
#ifdef PLUGIN_SET_TESTING
|
||||
#define USES_P045 // MPU6050
|
||||
#define USES_P047 // I2C_soil_misture
|
||||
#define USES_P048 // Motoshield_v2
|
||||
|
||||
@@ -126,9 +126,23 @@ void addFormNumericBox(LabelType::Enum label, int value, int min, int max
|
||||
);
|
||||
}
|
||||
|
||||
void addFormNumericBox(const __FlashStringHelper * label, const __FlashStringHelper * id, int value, int min, int max)
|
||||
void addFormNumericBox(const __FlashStringHelper * label,
|
||||
const __FlashStringHelper * id,
|
||||
int value,
|
||||
int min,
|
||||
int max
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
,
|
||||
const String& tooltip
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
)
|
||||
{
|
||||
addFormNumericBox(String(label), String(id), value, min, max);
|
||||
addFormNumericBox(String(label), String(id), value, min, max
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
, tooltip
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
void addFormNumericBox(const String& label, const String& id, int value, int min, int max
|
||||
@@ -178,6 +192,29 @@ void addFormFloatNumberBox(const String& label,
|
||||
);
|
||||
}
|
||||
|
||||
void addFormFloatNumberBox(const __FlashStringHelper * label,
|
||||
const __FlashStringHelper * id,
|
||||
float value,
|
||||
float min,
|
||||
float max,
|
||||
uint8_t nrDecimals,
|
||||
float stepsize
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
,
|
||||
const String& tooltip
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
)
|
||||
{
|
||||
addRowLabel_tr_id(label, id);
|
||||
addFloatNumberBox(id, value, min, max, nrDecimals, stepsize
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
, tooltip
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ********************************************************************************
|
||||
// Add a task selector form
|
||||
// ********************************************************************************
|
||||
@@ -401,6 +438,11 @@ void addFormSelector(const __FlashStringHelper * label, const __FlashStringHelpe
|
||||
addFormSelector(String(label), String(id), optionCount, options, indices, nullptr, selectedIndex, reloadonchange);
|
||||
}
|
||||
|
||||
void addFormSelector(const __FlashStringHelper * label, const String& id, int optionCount, const __FlashStringHelper * options[], const int indices[], int selectedIndex, bool reloadonchange)
|
||||
{
|
||||
addFormSelector(String(label), id, optionCount, options, indices, nullptr, selectedIndex, reloadonchange);
|
||||
}
|
||||
|
||||
void addFormSelector(const String& label, const String& id, int optionCount, const __FlashStringHelper * options[], const int indices[], int selectedIndex)
|
||||
{
|
||||
addFormSelector(label, id, optionCount, options, indices, nullptr, selectedIndex, false);
|
||||
|
||||
@@ -74,6 +74,17 @@ void addFormNumericBox(LabelType::Enum label,
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
|
||||
void addFormNumericBox(const __FlashStringHelper * label,
|
||||
const __FlashStringHelper * id,
|
||||
int value,
|
||||
int min = INT_MIN,
|
||||
int max = INT_MAX
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
,
|
||||
const String& tooltip = EMPTY_STRING
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
|
||||
void addFormNumericBox(const String& label,
|
||||
const String& id,
|
||||
int value,
|
||||
@@ -85,6 +96,7 @@ void addFormNumericBox(const String& label,
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
|
||||
|
||||
void addFormFloatNumberBox(LabelType::Enum label,
|
||||
float value,
|
||||
float min,
|
||||
@@ -109,7 +121,19 @@ void addFormFloatNumberBox(const String& label,
|
||||
const String& tooltip = EMPTY_STRING
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
void addFormNumericBox(const __FlashStringHelper * label, const __FlashStringHelper * id, int value, int min = INT_MIN, int max = INT_MAX);
|
||||
|
||||
void addFormFloatNumberBox(const __FlashStringHelper * label,
|
||||
const __FlashStringHelper * id,
|
||||
float value,
|
||||
float min,
|
||||
float max,
|
||||
uint8_t nrDecimals = 6,
|
||||
float stepsize = 0.0f
|
||||
#ifdef ENABLE_TOOLTIPS
|
||||
,
|
||||
const String& tooltip = EMPTY_STRING
|
||||
#endif // ifdef ENABLE_TOOLTIPS
|
||||
);
|
||||
|
||||
|
||||
// ********************************************************************************
|
||||
@@ -245,6 +269,7 @@ void addFormSelector(const String& label,
|
||||
);
|
||||
|
||||
void addFormSelector(const __FlashStringHelper * label, const __FlashStringHelper * id, int optionCount, const __FlashStringHelper * options[], const int indices[], int selectedIndex, bool reloadonchange = false);
|
||||
void addFormSelector(const __FlashStringHelper * label, const String& id, int optionCount, const __FlashStringHelper * options[], const int indices[], int selectedIndex, bool reloadonchange = false);
|
||||
void addFormSelector(const String& label, const String& id, int optionCount, const __FlashStringHelper * options[], const int indices[], int selectedIndex);
|
||||
void addFormSelector(const __FlashStringHelper * label, const __FlashStringHelper * id, int optionCount, const String options[], const int indices[], int selectedIndex);
|
||||
|
||||
|
||||
@@ -565,12 +565,24 @@ void json_close(bool arr) {
|
||||
lastLevel = level;
|
||||
}
|
||||
|
||||
void json_number(const __FlashStringHelper * name, const String& value)
|
||||
{
|
||||
json_prop(name, value);
|
||||
}
|
||||
|
||||
|
||||
void json_number(const String& name, const String& value) {
|
||||
json_prop(name, value);
|
||||
}
|
||||
|
||||
void json_prop(const __FlashStringHelper * name, const String& value)
|
||||
{
|
||||
json_quote_name(name);
|
||||
json_quote_val(value);
|
||||
lastLevel = level;
|
||||
}
|
||||
|
||||
|
||||
void json_prop(const String& name, const String& value) {
|
||||
json_quote_name(name);
|
||||
json_quote_val(value);
|
||||
|
||||
@@ -87,9 +87,15 @@ void json_close();
|
||||
|
||||
void json_close(bool arr);
|
||||
|
||||
void json_number(const __FlashStringHelper * name,
|
||||
const String& value);
|
||||
|
||||
void json_number(const String& name,
|
||||
const String& value);
|
||||
|
||||
void json_prop(const __FlashStringHelper * name,
|
||||
const String& value);
|
||||
|
||||
void json_prop(const String& name,
|
||||
const String& value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user