mirror of
https://github.com/wled/WLED.git
synced 2025-07-08 03:16:32 +00:00
Replace comment with compile-time error and warning
This commit is contained in:
parent
0db47a8586
commit
8f8afd98a5
@ -7,6 +7,10 @@
|
|||||||
#ifndef WLED_DISABLE_MQTT
|
#ifndef WLED_DISABLE_MQTT
|
||||||
#define MQTT_KEEP_ALIVE_TIME 60 // contact the MQTT broker every 60 seconds
|
#define MQTT_KEEP_ALIVE_TIME 60 // contact the MQTT broker every 60 seconds
|
||||||
|
|
||||||
|
#if MQTT_MAX_TOPIC_LEN > 32
|
||||||
|
#warning "MQTT topics length > 32 is not recommended for compatibility with usermods!"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void parseMQTTBriPayload(char* payload)
|
static void parseMQTTBriPayload(char* payload)
|
||||||
{
|
{
|
||||||
if (strstr(payload, "ON") || strstr(payload, "on") || strstr(payload, "true")) {bri = briLast; stateUpdated(CALL_MODE_DIRECT_CHANGE);}
|
if (strstr(payload, "ON") || strstr(payload, "on") || strstr(payload, "true")) {bri = briLast; stateUpdated(CALL_MODE_DIRECT_CHANGE);}
|
||||||
|
@ -476,7 +476,7 @@ WLED_GLOBAL uint16_t pollReplyCount _INIT(0); // count numbe
|
|||||||
WLED_GLOBAL unsigned long lastMqttReconnectAttempt _INIT(0); // used for other periodic tasks too
|
WLED_GLOBAL unsigned long lastMqttReconnectAttempt _INIT(0); // used for other periodic tasks too
|
||||||
#ifndef WLED_DISABLE_MQTT
|
#ifndef WLED_DISABLE_MQTT
|
||||||
#ifndef MQTT_MAX_TOPIC_LEN
|
#ifndef MQTT_MAX_TOPIC_LEN
|
||||||
#define MQTT_MAX_TOPIC_LEN 32 // should not be less than 32. might cause trouble when increased with usermods active that do not handle this correctly.
|
#define MQTT_MAX_TOPIC_LEN 32
|
||||||
#endif
|
#endif
|
||||||
#ifndef MQTT_MAX_SERVER_LEN
|
#ifndef MQTT_MAX_SERVER_LEN
|
||||||
#define MQTT_MAX_SERVER_LEN 32
|
#define MQTT_MAX_SERVER_LEN 32
|
||||||
|
4
wled00/wled_eeprom.cpp
Executable file → Normal file
4
wled00/wled_eeprom.cpp
Executable file → Normal file
@ -2,6 +2,10 @@
|
|||||||
#include <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
#include "wled.h"
|
#include "wled.h"
|
||||||
|
|
||||||
|
#if defined(WLED_ENABLE_MQTT) && MQTT_MAX_TOPIC_LEN < 32
|
||||||
|
#error "MQTT topics length < 32 is not supported by the EEPROM module!"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DEPRECATED, do not use for new settings
|
* DEPRECATED, do not use for new settings
|
||||||
* Only used to restore config from pre-0.11 installations using the deEEP() methods
|
* Only used to restore config from pre-0.11 installations using the deEEP() methods
|
||||||
|
Loading…
x
Reference in New Issue
Block a user