fix standalone compiling

This commit is contained in:
Proddy
2023-11-10 11:54:41 +01:00
parent 52077cbd07
commit 3fc36b5e50
3 changed files with 19 additions and 4 deletions

View File

@@ -24,6 +24,7 @@
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <math.h>
#include <algorithm> // for count_if #include <algorithm> // for count_if
@@ -187,4 +188,6 @@ void yield(void);
void setup(void); void setup(void);
void loop(void); void loop(void);
#endif #endif

View File

@@ -63,6 +63,7 @@ class DummySettings {
String jwtSecret = "ems-esp"; String jwtSecret = "ems-esp";
String ssid = "ems-esp"; String ssid = "ems-esp";
String password = "ems-esp"; String password = "ems-esp";
String bssid = "";
String localIP = ""; String localIP = "";
String gatewayIP = ""; String gatewayIP = "";
String subnetMask = ""; String subnetMask = "";

View File

@@ -45,6 +45,20 @@ class Preferences {
return NAN; return NAN;
} }
size_t putString(const char * key, const char * value) {
return 0;
}
size_t putString(const char * key, String value) {
return 0;
}
size_t getString(const char * key, char * value, size_t maxLen) {
return 0;
}
String getString(const char * key, String defaultValue = String()) {
return "";
}
// unused // unused
// void end(); // void end();
@@ -59,8 +73,7 @@ class Preferences {
// size_t putULong64(const char * key, uint64_t value); // size_t putULong64(const char * key, uint64_t value);
// size_t putFloat(const char * key, float_t value); // size_t putFloat(const char * key, float_t value);
// size_t putBool(const char * key, bool value); // size_t putBool(const char * key, bool value);
// size_t putString(const char * key, const char * value);
// size_t putString(const char * key, String value);
// size_t putBytes(const char * key, const void * value, size_t len); // size_t putBytes(const char * key, const void * value, size_t len);
// bool isKey(const char * key); // bool isKey(const char * key);
// PreferenceType getType(const char * key); // PreferenceType getType(const char * key);
@@ -75,8 +88,6 @@ class Preferences {
// uint64_t getULong64(const char * key, uint64_t defaultValue = 0); // uint64_t getULong64(const char * key, uint64_t defaultValue = 0);
// float_t getFloat(const char * key, float_t defaultValue = NAN); // float_t getFloat(const char * key, float_t defaultValue = NAN);
// bool getBool(const char * key, bool defaultValue = false); // bool getBool(const char * key, bool defaultValue = false);
// size_t getString(const char * key, char * value, size_t maxLen);
// String getString(const char * key, String defaultValue = String());
// size_t getBytesLength(const char * key); // size_t getBytesLength(const char * key);
// size_t getBytes(const char * key, void * buf, size_t maxLen); // size_t getBytes(const char * key, void * buf, size_t maxLen);
// size_t freeEntries(); // size_t freeEntries();