mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
changes to make it compile standalone
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
#include <string>
|
||||
#include <algorithm> // for count_if
|
||||
|
||||
#include "WString.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define IPAddress std::string
|
||||
@@ -129,7 +131,12 @@ class Print {
|
||||
size_t println(unsigned long value) {
|
||||
return print(std::to_string(value).c_str()) + println();
|
||||
}
|
||||
|
||||
virtual void flush(){};
|
||||
|
||||
size_t print(const String & str) {
|
||||
return print(str.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
class Stream : public Print {
|
||||
@@ -206,6 +213,6 @@ void yield(void);
|
||||
void setup(void);
|
||||
void loop(void);
|
||||
|
||||
#include "WString.h"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,6 +58,7 @@ class DummySettings {
|
||||
uint16_t publish_time_mixer = 10;
|
||||
uint16_t publish_time_other = 10;
|
||||
uint16_t publish_time_sensor = 10;
|
||||
bool enableIPv6 = false;
|
||||
|
||||
#define FACTORY_MQTT_MAX_TOPIC_LENGTH 128
|
||||
|
||||
@@ -80,6 +81,7 @@ class DummySettingsService : public StatefulService<DummySettings> {
|
||||
#define NetworkSettings DummySettings
|
||||
#define SecuritySettings DummySettings
|
||||
#define MqttSettings DummySettings
|
||||
#define NTPSettings DummySettings
|
||||
|
||||
class ESP8266React {
|
||||
public:
|
||||
@@ -110,6 +112,10 @@ class ESP8266React {
|
||||
return &_settings;
|
||||
}
|
||||
|
||||
StatefulService<DummySettings> * getNTPSettingsService() {
|
||||
return &_settings;
|
||||
}
|
||||
|
||||
private:
|
||||
DummySettingsService _settings;
|
||||
SecuritySettingsService _securitySettingsService;
|
||||
|
||||
@@ -56,6 +56,11 @@ inline bool operator==(const std::string & lhs, const ::String & rhs) {
|
||||
return lhs == rhs.c_str();
|
||||
}
|
||||
|
||||
inline bool operator!=(const ::String & lhs, const ::String & rhs) {
|
||||
return lhs.c_str() != rhs.c_str();
|
||||
}
|
||||
|
||||
|
||||
size_t strlcpy(char * __restrict dst, const char * __restrict src, size_t dsize);
|
||||
size_t strlcat(char * dst, const char * src, size_t siz);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user