fix for standalone simulating mqtt

This commit is contained in:
proddy
2020-10-17 16:54:39 +02:00
parent cafdb6f666
commit 4f0f476407
2 changed files with 8 additions and 4 deletions

View File

@@ -309,7 +309,7 @@ class Handler {
*/ */
class Logger { class Logger {
public: public:
/** /**
* This is the maximum length of any log message. * This is the maximum length of any log message.
* *
* Determines the size of the buffer used for format string * Determines the size of the buffer used for format string
@@ -317,7 +317,11 @@ class Logger {
* *
* @since 1.0.0 * @since 1.0.0
*/ */
#if defined(EMSESP_STANDALONE)
static constexpr size_t MAX_LOG_LENGTH = 500;
#else
static constexpr size_t MAX_LOG_LENGTH = 255; static constexpr size_t MAX_LOG_LENGTH = 255;
#endif
/** /**
* Create a new logger with the given name and logging facility. * Create a new logger with the given name and logging facility.

View File

@@ -77,13 +77,13 @@ class AsyncMqttClient {
void disconnect(bool force = false) { void disconnect(bool force = false) {
} }
uint16_t subscribe(const char * topic, uint8_t qos) { uint16_t subscribe(const char * topic, uint8_t qos) {
return 0; return 1;
} }
uint16_t unsubscribe(const char * topic) { uint16_t unsubscribe(const char * topic) {
return 0; return 1;
} }
uint16_t publish(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0, bool dup = false, uint16_t message_id = 0) { uint16_t publish(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0, bool dup = false, uint16_t message_id = 0) {
return 0; return 1;
} }
const char * getClientId() { const char * getClientId() {