stub to remove #ifndef EMSESP_STANDALONE

This commit is contained in:
MichaelDvP
2025-12-08 12:42:11 +01:00
parent a365dc7519
commit 515b75160c
13 changed files with 38 additions and 118 deletions

View File

@@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../core/telegram.h"
#ifndef EMSESP_STANDALONE
#include <esp32-psram.h>
#endif
#ifndef WebCustomEntityService_h
#define WebCustomEntityService_h
@@ -48,11 +46,7 @@ class CustomEntityItem {
class WebCustomEntity {
public:
#ifndef EMSESP_STANDALONE
std::list<CustomEntityItem, AllocatorPSRAM<CustomEntityItem>> customEntityItems;
#else
std::list<CustomEntityItem> customEntityItems;
#endif
static void read(WebCustomEntity & webEntity, JsonObject root);
static StateUpdateResult update(JsonObject root, WebCustomEntity & webEntity);
@@ -89,11 +83,8 @@ class WebCustomEntityService : public StatefulService<WebCustomEntity> {
void getEntities(AsyncWebServerRequest * request);
#ifndef EMSESP_STANDALONE
std::list<CustomEntityItem, AllocatorPSRAM<CustomEntityItem>> * customEntityItems_; // pointer to the list of entity items
#else
std::list<CustomEntityItem> * customEntityItems_; // pointer to the list of entity items
#endif
bool ha_registered_ = false;
};

View File

@@ -18,9 +18,7 @@
#ifndef WebCustomizationService_h
#define WebCustomizationService_h
#ifndef EMSESP_STANDALONE
#include <esp32-psram.h>
#endif
#define EMSESP_CUSTOMIZATION_FILE "/config/emsespCustomization.json"
@@ -73,15 +71,10 @@ class EntityCustomization {
class WebCustomization {
public:
#ifndef EMSESP_STANDALONE
std::list<SensorCustomization, AllocatorPSRAM<SensorCustomization>> sensorCustomizations; // for sensor names and offsets
std::list<AnalogCustomization, AllocatorPSRAM<AnalogCustomization>> analogCustomizations; // for analog sensors
std::list<EntityCustomization, AllocatorPSRAM<EntityCustomization>> entityCustomizations; // for a list of entities that have a special mask set
#else
std::list<SensorCustomization> sensorCustomizations; // for sensor names and offsets
std::list<AnalogCustomization> analogCustomizations; // for analog sensors
std::list<EntityCustomization> entityCustomizations; // for a list of entities that have a special mask set
#endif
static void read(WebCustomization & customizations, JsonObject root);
static StateUpdateResult update(JsonObject root, WebCustomization & customizations);

View File

@@ -21,10 +21,7 @@
#define EMSESP_EVENT_SOURCE_LOG_PATH "/es/log"
#define EMSESP_LOG_SETTINGS_PATH "/rest/logSettings"
#ifndef EMSESP_STANDALONE
#include <esp32-psram.h>
using stringPSRAM = std::basic_string<char, std::char_traits<char>, AllocatorPSRAM<char>>;
#endif
using ::uuid::console::Shell;
@@ -59,11 +56,7 @@ class WebLogService : public uuid::log::Handler {
uint64_t uptime_;
uuid::log::Level level_;
const char * name_;
#ifndef EMSESP_STANDALONE
stringPSRAM text_;
#else
std::string text_;
#endif
stringPSRAM text_;
};
void transmit(const QueuedLogMessage & message);
@@ -71,15 +64,11 @@ class WebLogService : public uuid::log::Handler {
char * messagetime(char * out, const uint64_t t, const size_t bufsize);
#ifndef EMSESP_STANDALONE
std::deque<QueuedLogMessage, AllocatorPSRAM<QueuedLogMessage>> log_messages_; // Queued log messages, in the order they were received
#else
std::deque<QueuedLogMessage> log_messages_; // Queued log messages, in the order they were received
#endif
size_t maximum_log_messages_ = MAX_LOG_MESSAGES; // Maximum number of log messages to buffer before they are output
size_t limit_log_messages_ = 1; // dynamic limit
unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages
unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch
size_t maximum_log_messages_ = MAX_LOG_MESSAGES; // Maximum number of log messages to buffer before they are output
size_t limit_log_messages_ = 1; // dynamic limit
unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages
unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch
bool compact_ = true;
uuid::log::Level level_ = uuid::log::Level::INFO;
};

View File

@@ -16,9 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EMSESP_STANDALONE
#include <esp32-psram.h>
#endif
#ifndef WebSchedulerService_h
#define WebSchedulerService_h
@@ -113,13 +111,8 @@ class WebSchedulerService : public StatefulService<WebScheduler> {
FSPersistence<WebScheduler> _fsPersistence;
bool ha_registered_ = false;
#ifndef EMSESP_STANDALONE
std::list<ScheduleItem, AllocatorPSRAM<ScheduleItem>> * scheduleItems_; // pointer to the list of schedule events
std::list<ScheduleItem *, AllocatorPSRAM<ScheduleItem *>> cmd_changed_; // pointer to commands in list that are triggert by change
#else
std::list<ScheduleItem> * scheduleItems_; // pointer to the list of schedule events
std::list<ScheduleItem *> cmd_changed_; // pointer to commands in list that are triggert by change
#endif
};
} // namespace emsesp