mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
Merge pull request #4162 from TD-er/bugfix/missing_include_common_h
[Build] Fix missing #include "ESPEasy_common.h"
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "../Commands/Blynk.h"
|
||||
|
||||
#ifdef USES_C012
|
||||
|
||||
#include "../Commands/Common.h"
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../ESPEasyCore/ESPEasy_backgroundtasks.h"
|
||||
@@ -12,7 +14,6 @@
|
||||
|
||||
#include "../../ESPEasy_fdwdecl.h"
|
||||
|
||||
#ifdef USES_C012
|
||||
|
||||
controllerIndex_t firstEnabledBlynk_ControllerIndex() {
|
||||
for (controllerIndex_t i = 0; i < CONTROLLER_MAX; ++i) {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
#define COMMAND_BLYNK_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
|
||||
#ifdef USES_C012
|
||||
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
|
||||
controllerIndex_t firstEnabledBlynk_ControllerIndex();
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "../Commands/GPIO.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
#include "../../ESPEasy-Globals.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../Commands/Common.h"
|
||||
#include "../DataStructs/PinMode.h"
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#endif // USES_MQTT
|
||||
|
||||
#include "../Commands/Networks.h"
|
||||
#ifdef USES_NOTIFIER
|
||||
#include "../Commands/Notifications.h"
|
||||
#endif
|
||||
#include "../Commands/Provisioning.h"
|
||||
#include "../Commands/RTC.h"
|
||||
#include "../Commands/Rules.h"
|
||||
@@ -388,7 +390,9 @@ bool executeInternalCommand(command_case_data & data)
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
COMMAND_CASE_A( "provisionconfig", Command_Provisioning_Config, 0); // Provisioning.h
|
||||
COMMAND_CASE_A( "provisionsecurity", Command_Provisioning_Security, 0); // Provisioning.h
|
||||
#ifdef USES_NOTIFIER
|
||||
COMMAND_CASE_A( "provisionnotification", Command_Provisioning_Notification, 0); // Provisioning.h
|
||||
#endif
|
||||
COMMAND_CASE_A( "provisionprovision", Command_Provisioning_Provision, 0); // Provisioning.h
|
||||
COMMAND_CASE_A( "provisionrules", Command_Provisioning_Rules, 1); // Provisioning.h
|
||||
COMMAND_CASE_A( "provisionfirmware", Command_Provisioning_Firmware, 1); // Provisioning.h
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#include "../Commands/Provisioning.h"
|
||||
|
||||
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
|
||||
# include "../Commands/Common.h"
|
||||
|
||||
# include "../../ESPEasy_common.h"
|
||||
# include "../DataTypes/ESPEasyFileType.h"
|
||||
# include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
# include "../Helpers/ESPEasy_Storage.h"
|
||||
@@ -22,10 +19,12 @@ String Command_Provisioning_Security(struct EventStruct *event, const char *Line
|
||||
return downloadFileType(FileType::SECURITY_DAT);
|
||||
}
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
String Command_Provisioning_Notification(struct EventStruct *event, const char *Line)
|
||||
{
|
||||
return downloadFileType(FileType::NOTIFICATION_DAT);
|
||||
}
|
||||
#endif
|
||||
|
||||
String Command_Provisioning_Provision(struct EventStruct *event, const char *Line)
|
||||
{
|
||||
|
||||
@@ -11,8 +11,10 @@ String Command_Provisioning_Config(struct EventStruct *event,
|
||||
const char *Line);
|
||||
String Command_Provisioning_Security(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#ifdef USES_NOTIFIER
|
||||
String Command_Provisioning_Notification(struct EventStruct *event,
|
||||
const char *Line);
|
||||
#endif
|
||||
String Command_Provisioning_Provision(struct EventStruct *event,
|
||||
const char *Line);
|
||||
String Command_Provisioning_Rules(struct EventStruct *event,
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <map>
|
||||
|
||||
#if FEATURE_SERVO
|
||||
|
||||
# include <Arduino.h>
|
||||
# include <map>
|
||||
# include <Servo.h>
|
||||
|
||||
// IRAM: doing servo stuff uses 740 bytes IRAM. (doesnt matter how many instances)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef COMMAND_UDP_H
|
||||
#define COMMAND_UDP_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
String Command_UDP_Port(struct EventStruct *event, const char* Line);
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "../ControllerQueue/C018_queue_element.h"
|
||||
|
||||
#ifdef USES_C018
|
||||
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
|
||||
#include "../ESPEasyCore/ESPEasy_Log.h"
|
||||
|
||||
#include "../Helpers/_CPlugin_LoRa_TTN_helper.h"
|
||||
|
||||
#ifdef USES_C018
|
||||
|
||||
C018_queue_element::C018_queue_element(struct EventStruct *event, uint8_t sampleSetCount) :
|
||||
TaskIndex(event->TaskIndex),
|
||||
controller_idx(event->ControllerIndex)
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#define CONTROLLERQUEUE_C018_QUEUE_ELEMENT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_C018
|
||||
|
||||
#include "../CustomBuild/ESPEasyLimits.h"
|
||||
#include "../DataStructs/UnitMessageCount.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
@@ -9,8 +12,6 @@
|
||||
|
||||
struct EventStruct;
|
||||
|
||||
#ifdef USES_C018
|
||||
|
||||
/*********************************************************************************************\
|
||||
* C018_queue_element for queueing requests for C018: TTN/RN2483
|
||||
\*********************************************************************************************/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef CONTROLLERQUEUE_CONTROLLER_DELAY_HANDLER_STRUCT_H
|
||||
#define CONTROLLERQUEUE_CONTROLLER_DELAY_HANDLER_STRUCT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
#include "../DataStructs/TimingStats.h"
|
||||
#include "../DataStructs/UnitMessageCount.h"
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
#define CONTROLLERQUEUE_MQTT_QUEUE_ELEMENT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
#include "../DataStructs/UnitMessageCount.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
#ifdef USES_MQTT
|
||||
|
||||
#include "../DataStructs/UnitMessageCount.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
/*********************************************************************************************\
|
||||
* MQTT_queue_element for all MQTT base controllers
|
||||
\*********************************************************************************************/
|
||||
|
||||
@@ -439,6 +439,12 @@ To create/register a plugin, you have to :
|
||||
#ifdef WEBSERVER_NEW_RULES
|
||||
#undef WEBSERVER_NEW_RULES
|
||||
#endif
|
||||
#ifdef SHOW_SYSINFO_JSON
|
||||
#undef SHOW_SYSINFO_JSON
|
||||
#endif
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
#define WEBSERVER_SYSINFO_MINIMAL
|
||||
#endif
|
||||
|
||||
|
||||
#endif // WEBSERVER_CUSTOM_BUILD_DEFINED
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef DATASTRUCTS_ESPEASY_EVENTSTRUCT_H
|
||||
#define DATASTRUCTS_ESPEASY_EVENTSTRUCT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../DataTypes/ControllerIndex.h"
|
||||
@@ -63,7 +65,9 @@ public:
|
||||
EventValueSource::Enum Source = EventValueSource::Enum::VALUE_SOURCE_NOT_SET;
|
||||
taskIndex_t TaskIndex = INVALID_TASK_INDEX; // index position in TaskSettings array, 0-11
|
||||
controllerIndex_t ControllerIndex = INVALID_CONTROLLER_INDEX; // index position in Settings.Controller, 0-3
|
||||
#ifdef USES_NOTIFIER
|
||||
notifierIndex_t NotificationIndex = INVALID_NOTIFIER_INDEX; // index position in Settings.Notification, 0-3
|
||||
#endif
|
||||
uint8_t BaseVarIndex = 0;
|
||||
Sensor_VType sensorType = Sensor_VType::SENSOR_TYPE_NOT_SET;
|
||||
uint8_t OriginTaskIndex = 0;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../DataStructs/EthernetEventData.h"
|
||||
|
||||
#if FEATURE_ETHERNET
|
||||
|
||||
#include "../ESPEasyCore/ESPEasy_Log.h"
|
||||
|
||||
// Bit numbers for Eth status
|
||||
@@ -152,4 +154,6 @@ String EthernetEventData_t::ESPEasyEthStatusToString() const {
|
||||
}
|
||||
return log;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,9 +1,15 @@
|
||||
#ifndef DATASTRUCTS_ETHERNETEVENTDATA_H
|
||||
#define DATASTRUCTS_ETHERNETEVENTDATA_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#if FEATURE_ETHERNET
|
||||
|
||||
#include "../Helpers/LongTermTimer.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef ESP32
|
||||
# include <esp_event.h>
|
||||
|
||||
@@ -73,4 +79,6 @@ struct EthernetEventData_t {
|
||||
unsigned long connectionFailures = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // ifndef DATASTRUCTS_ETHERNETEVENTDATA_H
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "../DataStructs/Modbus.h"
|
||||
|
||||
#ifdef USES_MODBUS
|
||||
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
#include "../ESPEasyCore/ESPEasy_Log.h"
|
||||
|
||||
#ifdef USES_MODBUS
|
||||
|
||||
Modbus::Modbus() : ModbusClient(nullptr), errcnt(0), timeout(0),
|
||||
TXRXstate(MODBUS_IDLE), RXavailable(0), payLoad(0) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../DataStructs/NotificationSettingsStruct.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
NotificationSettingsStruct::NotificationSettingsStruct() : Port(0), Pin1(-1), Pin2(-1) {
|
||||
ZERO_FILL(Server);
|
||||
@@ -24,3 +23,5 @@ NotificationSettingsStruct::NotificationSettingsStruct() : Port(0), Pin1(-1), Pi
|
||||
ZERO_TERMINATE(User);
|
||||
ZERO_TERMINATE(Pass);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef DATASTRUCTS_NOTIFICATIONSETTINGSSTRUCT_H
|
||||
#define DATASTRUCTS_NOTIFICATIONSETTINGSSTRUCT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <memory> // For std::shared_ptr
|
||||
|
||||
@@ -31,4 +35,5 @@ typedef std::shared_ptr<NotificationSettingsStruct> NotificationSettingsStruct_p
|
||||
#define MakeNotificationSettings(T) NotificationSettingsStruct_ptr_type NotificationSettingsStruct_ptr(new (std::nothrow) NotificationSettingsStruct());\
|
||||
NotificationSettingsStruct& T = *NotificationSettingsStruct_ptr;
|
||||
|
||||
#endif
|
||||
#endif // DATASTRUCTS_NOTIFICATIONSETTINGSSTRUCT_H
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef DATASTRUCTS_NOTIFICATIONSTRUCT_H
|
||||
#define DATASTRUCTS_NOTIFICATIONSTRUCT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
/*********************************************************************************************\
|
||||
* NotificationStruct
|
||||
@@ -15,5 +18,7 @@ struct NotificationStruct
|
||||
bool usesMessaging;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // DATASTRUCTS_NOTIFICATIONSTRUCT_H
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#ifndef DATASTRUCTS_SETTINGSSTRUCT_H
|
||||
#define DATASTRUCTS_SETTINGSSTRUCT_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../CustomBuild/ESPEasyLimits.h"
|
||||
#include "../DataStructs/DeviceStruct.h"
|
||||
#include "../DataTypes/EthernetParameters.h"
|
||||
#include "../DataTypes/NetworkMedium.h"
|
||||
#include "../DataTypes/TimeSource.h"
|
||||
#include "../Globals/Plugins.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
//we disable SPI if not defined
|
||||
#ifndef DEFAULT_SPI
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
#include "../DataStructs/TimingStats.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
#if FEATURE_TIMING_STATS
|
||||
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
#include "../Helpers/_CPlugin_Helper.h"
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
|
||||
#if FEATURE_TIMING_STATS
|
||||
|
||||
|
||||
std::map<int, TimingStats> pluginStats;
|
||||
std::map<int, TimingStats> controllerStats;
|
||||
std::map<int, TimingStats> miscStats;
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
#ifndef DATASTRUCTS_TIMINGSTATS_H
|
||||
#define DATASTRUCTS_TIMINGSTATS_H
|
||||
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
#if FEATURE_TIMING_STATS
|
||||
|
||||
#include "../Helpers/ESPEasy_time_calc.h"
|
||||
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
#include "../Globals/Settings.h"
|
||||
#include "../Helpers/ESPEasy_time_calc.h"
|
||||
|
||||
# include <Arduino.h>
|
||||
# include <map>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef DATATYPES_ESPEASY_PLUGIN_DEFS_H
|
||||
#define DATATYPES_ESPEASY_PLUGIN_DEFS_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
// ********************************************************************************
|
||||
// Plugin (Task) function calls
|
||||
|
||||
@@ -15,7 +15,12 @@ const __FlashStringHelper * SettingsType::getSettingsTypeString(Enum settingsTyp
|
||||
case Enum::CustomTaskSettings_Type: return F("CustomTaskSettings");
|
||||
case Enum::ControllerSettings_Type: return F("ControllerSettings");
|
||||
case Enum::CustomControllerSettings_Type: return F("CustomControllerSettings");
|
||||
case Enum::NotificationSettings_Type: return F("NotificationSettings");
|
||||
case Enum::NotificationSettings_Type:
|
||||
#ifdef USES_NOTIFIER
|
||||
return F("NotificationSettings");
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case Enum::SecuritySettings_Type: return F("SecuritySettings");
|
||||
case Enum::ExtdControllerCredentials_Type: return F("ExtendedControllerCredentials");
|
||||
|
||||
@@ -78,10 +83,12 @@ bool SettingsType::getSettingsParameters(Enum settingsType, int index, int& max_
|
||||
}
|
||||
case Enum::NotificationSettings_Type:
|
||||
{
|
||||
#ifdef USES_NOTIFIER
|
||||
max_index = NOTIFICATION_MAX;
|
||||
offset = index * (DAT_NOTIFICATION_SIZE);
|
||||
max_size = DAT_NOTIFICATION_SIZE;
|
||||
struct_size = sizeof(NotificationSettingsStruct);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case Enum::SecuritySettings_Type:
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifndef NETWORK_H
|
||||
#define NETWORK_H
|
||||
|
||||
#include "../DataStructs/MAC_address.h"
|
||||
|
||||
void setNetworkMedium(NetworkMedium_t medium);
|
||||
@@ -33,5 +30,4 @@ uint8_t EthLinkSpeed();
|
||||
#endif // if FEATURE_ETHERNET
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "../ESPEasyCore/ESPEasy_backgroundtasks.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../../ESPEasy-Globals.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
#include "../DataStructs/TimingStats.h"
|
||||
#include "../ESPEasyCore/ESPEasyNetwork.h"
|
||||
#include "../ESPEasyCore/Serial.h"
|
||||
|
||||
@@ -280,10 +280,28 @@ void ESPEasy_setup()
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableController(toDisable);
|
||||
}
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableNotification(toDisable);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableRules(toDisable);
|
||||
}
|
||||
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableAllPlugins(toDisable);
|
||||
}
|
||||
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableAllControllers(toDisable);
|
||||
}
|
||||
#ifdef USES_NOTIFIER
|
||||
if (toDisable != 0) {
|
||||
toDisable = disableAllNotifications(toDisable);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if FEATURE_ETHERNET
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef GLOBALS_CPLUGIN_H
|
||||
#define GLOBALS_CPLUGIN_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../CustomBuild/ESPEasyLimits.h"
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "../DataTypes/ControllerIndex.h"
|
||||
#include "../DataTypes/ProtocolIndex.h"
|
||||
|
||||
#include <map>
|
||||
//#include <vector>
|
||||
|
||||
|
||||
/********************************************************************************************\
|
||||
Structures to address the Cplugins (controllers) and their configurations.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef GLOBALS_ESPEASYWIFIEVENT_H
|
||||
#define GLOBALS_ESPEASYWIFIEVENT_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <IPAddress.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
@@ -12,6 +9,10 @@
|
||||
#include "../DataStructs/EthernetEventData.h"
|
||||
#endif
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <IPAddress.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#ifdef ESP32
|
||||
# include <esp_event.h>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../Globals/NPlugins.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../DataStructs/NotificationStruct.h"
|
||||
@@ -122,4 +123,6 @@ bool addNPlugin(npluginID_t npluginID, nprotocolIndex_t x) {
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../CustomBuild/ESPEasyLimits.h"
|
||||
#include "../DataStructs/NotificationStruct.h"
|
||||
#include "../DataStructs/NotificationSettingsStruct.h"
|
||||
@@ -41,4 +43,6 @@ nprotocolIndex_t getNProtocolIndex(npluginID_t Number);
|
||||
nprotocolIndex_t getNProtocolIndex_from_NotifierIndex(notifierIndex_t index);
|
||||
bool addNPlugin(npluginID_t npluginID, nprotocolIndex_t x);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // GLOBALS_NPLUGIN_H
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef GLOBALS_NODES_H
|
||||
#define GLOBALS_NODES_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
#include "../DataStructs/NodeStruct.h"
|
||||
|
||||
#if FEATURE_ESPEASY_P2P
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../Globals/RamTracker.h"
|
||||
|
||||
#ifndef BUILD_NO_RAM_TRACKER
|
||||
|
||||
|
||||
#include "../ESPEasyCore/ESPEasy_Log.h"
|
||||
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "../Helpers/Memory.h"
|
||||
#include "../Helpers/Misc.h"
|
||||
|
||||
#ifndef BUILD_NO_RAM_TRACKER
|
||||
RamTracker myRamTracker;
|
||||
|
||||
/********************************************************************************************\
|
||||
|
||||
@@ -619,6 +619,17 @@ uint8_t disablePlugin(uint8_t bootFailedCount) {
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
uint8_t disableAllPlugins(uint8_t bootFailedCount) {
|
||||
if (bootFailedCount > 0) {
|
||||
--bootFailedCount;
|
||||
for (taskIndex_t i = 0; i < TASKS_MAX; ++i) {
|
||||
Settings.TaskDeviceEnabled[i] = false;
|
||||
}
|
||||
}
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Controller, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
@@ -635,9 +646,21 @@ uint8_t disableController(uint8_t bootFailedCount) {
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
uint8_t disableAllControllers(uint8_t bootFailedCount) {
|
||||
if (bootFailedCount > 0) {
|
||||
--bootFailedCount;
|
||||
for (controllerIndex_t i = 0; i < CONTROLLER_MAX; ++i) {
|
||||
Settings.ControllerEnabled[i] = false;
|
||||
}
|
||||
}
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Notification, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
#ifdef USES_NOTIFIER
|
||||
uint8_t disableNotification(uint8_t bootFailedCount) {
|
||||
for (uint8_t i = 0; i < NOTIFICATION_MAX && bootFailedCount > 0; ++i) {
|
||||
if (Settings.NotificationEnabled[i]) {
|
||||
@@ -651,6 +674,28 @@ uint8_t disableNotification(uint8_t bootFailedCount) {
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
uint8_t disableAllNotifications(uint8_t bootFailedCount) {
|
||||
if (bootFailedCount > 0) {
|
||||
--bootFailedCount;
|
||||
for (uint8_t i = 0; i < NOTIFICATION_MAX; ++i) {
|
||||
Settings.NotificationEnabled[i] = false;
|
||||
}
|
||||
}
|
||||
return bootFailedCount;
|
||||
}
|
||||
#endif
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Rules, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
uint8_t disableRules(uint8_t bootFailedCount) {
|
||||
if (bootFailedCount > 0) {
|
||||
--bootFailedCount;
|
||||
Settings.UseRules = false;
|
||||
}
|
||||
return bootFailedCount;
|
||||
}
|
||||
|
||||
|
||||
bool getAndLogSettingsParameters(bool read, SettingsType::Enum settingsType, int index, int& offset, int& max_size) {
|
||||
#ifndef BUILD_NO_DEBUG
|
||||
@@ -1114,6 +1159,7 @@ String loadProvisioningSettings(ProvisioningStruct& ProvisioningSettings)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
/********************************************************************************************\
|
||||
Save Controller settings to file system
|
||||
\*********************************************************************************************/
|
||||
@@ -1135,7 +1181,7 @@ String LoadNotificationSettings(int NotificationIndex, uint8_t *memAddress, int
|
||||
#endif
|
||||
return LoadFromFile(SettingsType::Enum::NotificationSettings_Type, NotificationIndex, memAddress, datasize);
|
||||
}
|
||||
|
||||
#endif
|
||||
/********************************************************************************************\
|
||||
Init a file with zeros on file system
|
||||
\*********************************************************************************************/
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef HELPERS_ESPEASY_STORAGE_H
|
||||
#define HELPERS_ESPEASY_STORAGE_H
|
||||
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <FS.h>
|
||||
|
||||
#include "../DataStructs/ProvisioningStruct.h"
|
||||
@@ -9,8 +12,6 @@
|
||||
#include "../Globals/Plugins.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
/********************************************************************************************\
|
||||
file system error handling
|
||||
Look here for error # reference: https://github.com/pellepl/spiffs/blob/master/src/spiffs.h
|
||||
@@ -77,16 +78,27 @@ String LoadSettings();
|
||||
Disable Plugin, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
uint8_t disablePlugin(uint8_t bootFailedCount);
|
||||
uint8_t disableAllPlugins(uint8_t bootFailedCount);
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Controller, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
uint8_t disableController(uint8_t bootFailedCount);
|
||||
uint8_t disableAllControllers(uint8_t bootFailedCount);
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Notification, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
#ifdef USES_NOTIFIER
|
||||
uint8_t disableNotification(uint8_t bootFailedCount);
|
||||
uint8_t disableAllNotifications(uint8_t bootFailedCount);
|
||||
#endif
|
||||
|
||||
/********************************************************************************************\
|
||||
Disable Rules, based on bootFailedCount
|
||||
\*********************************************************************************************/
|
||||
uint8_t disableRules(uint8_t bootFailedCount);
|
||||
|
||||
|
||||
bool getAndLogSettingsParameters(bool read, SettingsType::Enum settingsType, int index, int& offset, int& max_size);
|
||||
|
||||
@@ -183,7 +195,7 @@ String loadProvisioningSettings(ProvisioningStruct& ProvisioningSettings);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
/********************************************************************************************\
|
||||
Save Controller settings to file system
|
||||
\*********************************************************************************************/
|
||||
@@ -195,7 +207,7 @@ String SaveNotificationSettings(int NotificationIndex, const uint8_t *memAddress
|
||||
\*********************************************************************************************/
|
||||
String LoadNotificationSettings(int NotificationIndex, uint8_t *memAddress, int datasize);
|
||||
|
||||
|
||||
#endif
|
||||
/********************************************************************************************\
|
||||
Init a file with zeros on file system
|
||||
\*********************************************************************************************/
|
||||
|
||||
@@ -7,13 +7,11 @@
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
#include "../DataStructs/DeviceStruct.h"
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../DataStructs/ExtraTaskSettingsStruct.h"
|
||||
#include "../DataStructs/FactoryDefaultPref.h"
|
||||
#include "../DataStructs/GpioFactorySettingsStruct.h"
|
||||
#include "../DataStructs/LogStruct.h"
|
||||
#include "../DataStructs/NodeStruct.h"
|
||||
#include "../DataStructs/NodeStruct.h"
|
||||
#include "../DataStructs/PortStatusStruct.h"
|
||||
#include "../DataStructs/ProtocolStruct.h"
|
||||
#if FEATURE_CUSTOM_PROVISIONING
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef HELPERS_ESPEASY_TIME_H
|
||||
#define HELPERS_ESPEASY_TIME_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../DataTypes/ESPEasyTimeSource.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef HELPERS_HARDWARE_H
|
||||
#define HELPERS_HARDWARE_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../DataStructs/GpioFactorySettingsStruct.h"
|
||||
@@ -11,8 +13,6 @@
|
||||
|
||||
#include "../Globals/ResetFactoryDefaultPref.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef ESP32
|
||||
# include <driver/adc.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef HELPERS_MISC_H
|
||||
#define HELPERS_MISC_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../DataStructs/PinMode.h"
|
||||
@@ -8,8 +10,6 @@
|
||||
#include "../DataTypes/TaskIndex.h"
|
||||
#include "../Helpers/Scheduler.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
bool remoteConfig(struct EventStruct *event,
|
||||
const String & string);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "../Helpers/Networking.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
#include "../Commands/InternalCommands.h"
|
||||
#include "../CustomBuild/CompiletimeDefines.h"
|
||||
#include "../DataStructs/TimingStats.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "../Helpers/PeriodicalActions.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../../ESPEasy-Globals.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef HELPERS_PERIODICALACTIONS_H
|
||||
#define HELPERS_PERIODICALACTIONS_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "../Helpers/Scheduler.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../../ESPEasy-Globals.h"
|
||||
|
||||
@@ -80,7 +79,9 @@ const __FlashStringHelper * ESPEasy_Scheduler::toString(ESPEasy_Scheduler::Plugi
|
||||
switch (pluginType) {
|
||||
case PluginPtrType::TaskPlugin: return F("Plugin");
|
||||
case PluginPtrType::ControllerPlugin: return F("Controller");
|
||||
#ifdef USES_NOTIFIER
|
||||
case PluginPtrType::NotificationPlugin: return F("Notification");
|
||||
#endif
|
||||
}
|
||||
return F("unknown");
|
||||
}
|
||||
@@ -1054,6 +1055,7 @@ void ESPEasy_Scheduler::schedule_plugin_task_event_timer(deviceIndex_t DeviceInd
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USES_MQTT
|
||||
void ESPEasy_Scheduler::schedule_mqtt_plugin_import_event_timer(deviceIndex_t DeviceIndex,
|
||||
taskIndex_t TaskIndex,
|
||||
uint8_t Function,
|
||||
@@ -1084,6 +1086,7 @@ void ESPEasy_Scheduler::schedule_mqtt_plugin_import_event_timer(deviceIndex_t De
|
||||
ScheduledEventQueue.emplace_back(mixedId, std::move(event));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ESPEasy_Scheduler::schedule_controller_event_timer(protocolIndex_t ProtocolIndex, uint8_t Function, struct EventStruct&& event) {
|
||||
if (validProtocolIndex(ProtocolIndex)) {
|
||||
@@ -1099,6 +1102,7 @@ unsigned long ESPEasy_Scheduler::createSystemEventMixedId(PluginPtrType ptr_type
|
||||
return getMixedId(SchedulerTimerType_e::SystemEventQueue, subId);
|
||||
}
|
||||
|
||||
#ifdef USES_MQTT
|
||||
void ESPEasy_Scheduler::schedule_mqtt_controller_event_timer(protocolIndex_t ProtocolIndex,
|
||||
CPlugin::Function Function,
|
||||
char *c_topic,
|
||||
@@ -1123,12 +1127,15 @@ void ESPEasy_Scheduler::schedule_mqtt_controller_event_timer(protocolIndex_t P
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
void ESPEasy_Scheduler::schedule_notification_event_timer(uint8_t NotificationProtocolIndex,
|
||||
NPlugin::Function Function,
|
||||
struct EventStruct&& event) {
|
||||
schedule_event_timer(PluginPtrType::NotificationPlugin, NotificationProtocolIndex, static_cast<uint8_t>(Function), std::move(event));
|
||||
}
|
||||
#endif
|
||||
|
||||
void ESPEasy_Scheduler::schedule_event_timer(PluginPtrType ptr_type, uint8_t Index, uint8_t Function, struct EventStruct&& event) {
|
||||
const unsigned long mixedId = createSystemEventMixedId(ptr_type, Index, Function);
|
||||
@@ -1177,9 +1184,11 @@ void ESPEasy_Scheduler::process_system_event_queue() {
|
||||
case PluginPtrType::ControllerPlugin:
|
||||
CPluginCall(Index, static_cast<CPlugin::Function>(Function), &ScheduledEventQueue.front().event, tmpString);
|
||||
break;
|
||||
#ifdef USES_NOTIFIER
|
||||
case PluginPtrType::NotificationPlugin:
|
||||
NPlugin_ptr[Index](static_cast<NPlugin::Function>(Function), &ScheduledEventQueue.front().event, tmpString);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
ScheduledEventQueue.pop_front();
|
||||
STOP_TIMER(PROCESS_SYSTEM_EVENT_QUEUE);
|
||||
|
||||
@@ -74,8 +74,10 @@ public:
|
||||
|
||||
enum class PluginPtrType {
|
||||
TaskPlugin,
|
||||
ControllerPlugin,
|
||||
NotificationPlugin
|
||||
ControllerPlugin
|
||||
#ifdef USES_NOTIFIER
|
||||
,NotificationPlugin
|
||||
#endif
|
||||
};
|
||||
|
||||
static const __FlashStringHelper* toString(PluginPtrType pluginType);
|
||||
@@ -252,12 +254,14 @@ public:
|
||||
uint8_t Function,
|
||||
struct EventStruct&& event);
|
||||
|
||||
#ifdef USES_MQTT
|
||||
void schedule_mqtt_plugin_import_event_timer(deviceIndex_t DeviceIndex,
|
||||
taskIndex_t TaskIndex,
|
||||
uint8_t Function,
|
||||
char *c_topic,
|
||||
uint8_t *b_payload,
|
||||
unsigned int length);
|
||||
#endif
|
||||
|
||||
|
||||
// Note: the event will be moved
|
||||
@@ -265,16 +269,20 @@ public:
|
||||
uint8_t Function,
|
||||
struct EventStruct&& event);
|
||||
|
||||
#ifdef USES_MQTT
|
||||
void schedule_mqtt_controller_event_timer(protocolIndex_t ProtocolIndex,
|
||||
CPlugin::Function Function,
|
||||
char *c_topic,
|
||||
uint8_t *b_payload,
|
||||
unsigned int length);
|
||||
#endif
|
||||
|
||||
// Note: The event will be moved
|
||||
#ifdef USES_NOTIFIER
|
||||
void schedule_notification_event_timer(uint8_t NotificationProtocolIndex,
|
||||
NPlugin::Function Function,
|
||||
struct EventStruct&& event);
|
||||
#endif
|
||||
|
||||
|
||||
static unsigned long createSystemEventMixedId(PluginPtrType ptr_type,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef HELPERS_STRINGCONVERTER_H
|
||||
#define HELPERS_STRINGCONVERTER_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../Globals/Plugins.h"
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#include "../Helpers/StringGenerator_System.h"
|
||||
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
/*********************************************************************************************\
|
||||
ESPEasy specific strings
|
||||
\*********************************************************************************************/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef HELPERS_STRINGGENERATOR_SYSTEM_H
|
||||
#define HELPERS_STRINGGENERATOR_SYSTEM_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
#include "../Globals/Statistics.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../Helpers/StringParser.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../../_Plugin_Helper.h"
|
||||
|
||||
#include "../Commands/GPIO.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef HELPERS_STRINGPARSER_H
|
||||
#define HELPERS_STRINGPARSER_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "../Globals/Plugins.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "../WebServer/JSON.h"
|
||||
#include "../WebServer/AccessControl.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
String getInternalLabel(LabelType::Enum label, char replaceSpace) {
|
||||
return to_internal_string(getLabel(label), replaceSpace);
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
|
||||
|
||||
struct LabelType;
|
||||
|
||||
// enum LabelType::Enum : short;
|
||||
|
||||
struct LabelType {
|
||||
enum Enum : short {
|
||||
UNIT_NR,
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#include "../Globals/Settings.h"
|
||||
#include "../Helpers/Misc.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
#define WIFI_CUSTOM_DEPLOYMENT_KEY_INDEX 3
|
||||
#define WIFI_CUSTOM_SUPPORT_KEY_INDEX 4
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#ifndef HELPERS_WIFI_AP_CANDIDATESLIST_H
|
||||
#define HELPERS_WIFI_AP_CANDIDATESLIST_H
|
||||
|
||||
#include "../DataStructs/WiFi_AP_Candidate.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../DataStructs/WiFi_AP_Candidate.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
typedef std::list<WiFi_AP_Candidate>::const_iterator WiFi_AP_Candidate_const_iterator;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../Helpers/_CPlugin_Helper_webform.h"
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../Helpers/_NPlugin_init.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../DataStructs/ESPEasy_EventStruct.h"
|
||||
#include "../DataStructs/TimingStats.h"
|
||||
|
||||
@@ -1074,3 +1076,4 @@ void NPluginInit()
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../DataTypes/ESPEasy_plugin_functions.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
@@ -1043,5 +1045,6 @@ void NPluginInit();
|
||||
|
||||
#undef ADDNPLUGIN_H
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,13 @@
|
||||
#include "../PluginStructs/P082_data_struct.h"
|
||||
|
||||
#ifdef USES_P082
|
||||
|
||||
|
||||
// Needed also here for PlatformIO's library finder as the .h file
|
||||
// is in a directory which is excluded in the src_filter
|
||||
# include <TinyGPS++.h>
|
||||
# include <ESPeasySerial.h>
|
||||
|
||||
#ifdef USES_P082
|
||||
|
||||
const __FlashStringHelper * Plugin_082_valuename(P082_query value_nr, bool displayString) {
|
||||
switch (value_nr) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../PluginStructs/P087_data_struct.h"
|
||||
|
||||
#ifdef USES_P087
|
||||
|
||||
|
||||
// Needed also here for PlatformIO's library finder as the .h file
|
||||
// is in a directory which is excluded in the src_filter
|
||||
@@ -7,8 +9,6 @@
|
||||
#include <Regexp.h>
|
||||
|
||||
|
||||
#ifdef USES_P087
|
||||
|
||||
#include <vector>
|
||||
|
||||
P087_data_struct::P087_data_struct() : easySerial(nullptr) {}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#include "../PluginStructs/P094_data_struct.h"
|
||||
|
||||
#ifdef USES_P094
|
||||
|
||||
// Needed also here for PlatformIO's library finder as the .h file
|
||||
// is in a directory which is excluded in the src_filter
|
||||
#include <ESPeasySerial.h>
|
||||
|
||||
#ifdef USES_P094
|
||||
#include <Regexp.h>
|
||||
|
||||
#include "../Globals/ESPEasy_time.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/AdvancedConfigPage.h"
|
||||
|
||||
#ifdef WEBSERVER_ADVANCED
|
||||
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
#include "../WebServer/Markup_Buttons.h"
|
||||
@@ -15,9 +17,6 @@
|
||||
#include "../Helpers/ESPEasy_Storage.h"
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_ADVANCED
|
||||
|
||||
void setLogLevelFor(uint8_t destination, LabelType::Enum label) {
|
||||
setLogLevelFor(destination, getFormItemInt(getInternalLabel(label)));
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#include "../WebServer/common.h"
|
||||
|
||||
#ifdef WEBSERVER_ADVANCED
|
||||
|
||||
#include "../DataTypes/TimeSource.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_ADVANCED
|
||||
|
||||
// ********************************************************************************
|
||||
// Web Interface config page
|
||||
// ********************************************************************************
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
|
||||
#include "../WebServer/common.h"
|
||||
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
|
||||
|
||||
|
||||
#ifdef WEBSERVER_CONTROLLERS
|
||||
|
||||
#include "../DataStructs/ControllerSettingsStruct.h"
|
||||
|
||||
#include "../Globals/CPlugins.h"
|
||||
|
||||
// ********************************************************************************
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/HardwarePage.h"
|
||||
|
||||
#ifdef WEBSERVER_HARDWARE
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -17,8 +19,6 @@
|
||||
#include "../Helpers/StringConverter.h"
|
||||
#include "../Helpers/StringGenerator_GPIO.h"
|
||||
|
||||
#ifdef WEBSERVER_HARDWARE
|
||||
|
||||
// ********************************************************************************
|
||||
// Web Interface hardware page
|
||||
// ********************************************************************************
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/I2C_Scanner.h"
|
||||
|
||||
#ifdef WEBSERVER_I2C_SCANNER
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/AccessControl.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
@@ -10,7 +12,6 @@
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_I2C_SCANNER
|
||||
|
||||
#ifdef WEBSERVER_NEW_UI
|
||||
|
||||
|
||||
@@ -556,6 +556,7 @@ void handle_buildinfo() {
|
||||
}
|
||||
json_close(true);
|
||||
}
|
||||
#ifdef USES_NOTIFIER
|
||||
{
|
||||
json_open(true, F("notifications"));
|
||||
|
||||
@@ -569,6 +570,7 @@ void handle_buildinfo() {
|
||||
}
|
||||
json_close(true);
|
||||
}
|
||||
#endif
|
||||
json_prop(LabelType::BUILD_DESC);
|
||||
json_prop(LabelType::GIT_BUILD);
|
||||
json_prop(LabelType::SYSTEM_LIBRARIES);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/NotificationPage.h"
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -19,9 +21,6 @@
|
||||
// ********************************************************************************
|
||||
// Web Interface notifcations page
|
||||
// ********************************************************************************
|
||||
|
||||
#ifdef USES_NOTIFIER
|
||||
|
||||
#include "../Globals/NPlugins.h"
|
||||
|
||||
|
||||
|
||||
@@ -157,13 +157,16 @@ void handle_setup() {
|
||||
|
||||
html_table_class_normal();
|
||||
html_TR();
|
||||
|
||||
#if defined(WEBSERVER_SYSINFO) && !defined(WEBSERVER_SYSINFO_MINIMAL)
|
||||
handle_sysinfo_NetworkServices();
|
||||
#endif
|
||||
if (connected) {
|
||||
|
||||
//addFormHeader(F("Current network configuration"));
|
||||
|
||||
#ifdef WEBSERVER_SYSINFO
|
||||
handle_sysinfo_Network();
|
||||
#endif
|
||||
|
||||
addFormSeparator(2);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/SysInfoPage.h"
|
||||
|
||||
#if defined(WEBSERVER_SYSINFO) || defined(SHOW_SYSINFO_JSON)
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -254,7 +256,9 @@ void handle_sysinfo() {
|
||||
|
||||
handle_sysinfo_basicInfo();
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
handle_sysinfo_memory();
|
||||
#endif
|
||||
|
||||
handle_sysinfo_Network();
|
||||
|
||||
@@ -262,10 +266,13 @@ void handle_sysinfo() {
|
||||
handle_sysinfo_Ethernet();
|
||||
# endif // if FEATURE_ETHERNET
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
handle_sysinfo_WiFiSettings();
|
||||
#endif
|
||||
|
||||
handle_sysinfo_Firmware();
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
handle_sysinfo_SystemStatus();
|
||||
|
||||
handle_sysinfo_NetworkServices();
|
||||
@@ -273,6 +280,7 @@ void handle_sysinfo() {
|
||||
handle_sysinfo_ESP_Board();
|
||||
|
||||
handle_sysinfo_Storage();
|
||||
#endif
|
||||
|
||||
|
||||
html_end_table();
|
||||
@@ -321,6 +329,7 @@ void handle_sysinfo_basicInfo() {
|
||||
addRowLabelValue(LabelType::SW_WD_COUNT);
|
||||
}
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_memory() {
|
||||
addTableSeparator(F("Memory"), 2, 3);
|
||||
|
||||
@@ -381,6 +390,7 @@ void handle_sysinfo_memory() {
|
||||
}
|
||||
# endif // if defined(ESP32) && defined(BOARD_HAS_PSRAM)
|
||||
}
|
||||
#endif
|
||||
|
||||
# if FEATURE_ETHERNET
|
||||
void handle_sysinfo_Ethernet() {
|
||||
@@ -460,6 +470,7 @@ void handle_sysinfo_Network() {
|
||||
html_TR();
|
||||
}
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_WiFiSettings() {
|
||||
addTableSeparator(F("WiFi Settings"), 2, 3);
|
||||
addRowLabelValue(LabelType::FORCE_WIFI_BG);
|
||||
@@ -480,6 +491,7 @@ void handle_sysinfo_WiFiSettings() {
|
||||
addRowLabelValue(LabelType::WIFI_NR_EXTRA_SCANS);
|
||||
addRowLabelValue(LabelType::WIFI_USE_LAST_CONN_FROM_RTC);
|
||||
}
|
||||
#endif
|
||||
|
||||
void handle_sysinfo_Firmware() {
|
||||
addTableSeparator(F("Firmware"), 2, 3);
|
||||
@@ -502,6 +514,7 @@ void handle_sysinfo_Firmware() {
|
||||
addRowLabelValue_copy(LabelType::GIT_HEAD);
|
||||
}
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_SystemStatus() {
|
||||
addTableSeparator(F("System Status"), 2, 3);
|
||||
|
||||
@@ -518,7 +531,9 @@ void handle_sysinfo_SystemStatus() {
|
||||
addRowLabelValue(LabelType::I2C_BUS_CLEARED_COUNT);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_NetworkServices() {
|
||||
addTableSeparator(F("Network Services"), 2, 3);
|
||||
|
||||
@@ -535,7 +550,9 @@ void handle_sysinfo_NetworkServices() {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_ESP_Board() {
|
||||
addTableSeparator(F("ESP Board"), 2, 3);
|
||||
|
||||
@@ -562,7 +579,9 @@ void handle_sysinfo_ESP_Board() {
|
||||
addRowLabelValue(LabelType::ESP_CHIP_CORES);
|
||||
addRowLabelValue(LabelType::ESP_BOARD_NAME);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_Storage() {
|
||||
addTableSeparator(F("Storage"), 2, 3);
|
||||
|
||||
@@ -739,5 +758,9 @@ void handle_sysinfo_Storage() {
|
||||
getPartitionTableSVG(ESP_PARTITION_TYPE_APP, 0xab56e6);
|
||||
# endif // ifdef ESP32
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ifdef WEBSERVER_SYSINFO
|
||||
|
||||
|
||||
#endif
|
||||
@@ -4,14 +4,14 @@
|
||||
#include "../WebServer/common.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_NEW_UI
|
||||
#ifdef SHOW_SYSINFO_JSON
|
||||
|
||||
// ********************************************************************************
|
||||
// Web Interface sysinfo page
|
||||
// ********************************************************************************
|
||||
void handle_sysinfo_json();
|
||||
|
||||
#endif // WEBSERVER_NEW_UI
|
||||
#endif
|
||||
|
||||
#ifdef WEBSERVER_SYSINFO
|
||||
|
||||
@@ -19,7 +19,9 @@ void handle_sysinfo();
|
||||
|
||||
void handle_sysinfo_basicInfo();
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_memory();
|
||||
#endif
|
||||
|
||||
#if FEATURE_ETHERNET
|
||||
void handle_sysinfo_Ethernet();
|
||||
@@ -27,10 +29,13 @@ void handle_sysinfo_Ethernet();
|
||||
|
||||
void handle_sysinfo_Network();
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_WiFiSettings();
|
||||
#endif
|
||||
|
||||
void handle_sysinfo_Firmware();
|
||||
|
||||
#ifndef WEBSERVER_SYSINFO_MINIMAL
|
||||
void handle_sysinfo_SystemStatus();
|
||||
|
||||
void handle_sysinfo_NetworkServices();
|
||||
@@ -38,6 +43,7 @@ void handle_sysinfo_NetworkServices();
|
||||
void handle_sysinfo_ESP_Board();
|
||||
|
||||
void handle_sysinfo_Storage();
|
||||
#endif
|
||||
|
||||
#endif // ifdef WEBSERVER_SYSINFO
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "../WebServer/SysVarPage.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_SYSVARS
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/AccessControl.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -11,7 +14,6 @@
|
||||
#include "../Helpers/StringConverter.h"
|
||||
#include "../Helpers/SystemVariables.h"
|
||||
|
||||
#ifdef WEBSERVER_SYSVARS
|
||||
|
||||
|
||||
// ********************************************************************************
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/TimingStats.h"
|
||||
|
||||
#if defined(WEBSERVER_TIMINGSTATS) && FEATURE_TIMING_STATS
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -11,7 +13,6 @@
|
||||
#include "../Globals/Protocol.h"
|
||||
#include "../Globals/RamTracker.h"
|
||||
|
||||
#if defined(WEBSERVER_TIMINGSTATS) && FEATURE_TIMING_STATS
|
||||
#include "../Globals/Device.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../WebServer/ToolsPage.h"
|
||||
|
||||
#ifdef WEBSERVER_TOOLS
|
||||
|
||||
#include "../WebServer/WebServer.h"
|
||||
#include "../WebServer/HTML_wrappers.h"
|
||||
#include "../WebServer/Markup.h"
|
||||
@@ -10,9 +12,6 @@
|
||||
|
||||
#include "../../ESPEasy-Globals.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_TOOLS
|
||||
|
||||
# include "../Commands/InternalCommands.h"
|
||||
# include "../Helpers/WebServer_commandHelper.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef WEBSERVER_WEBTEMPLATEPARSER_H
|
||||
#define WEBSERVER_WEBTEMPLATEPARSER_H
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user