Fix wrong base topic if gateway_name is changed (#1242)

* Rectify and match parameters sizes.
Increase mqtt_topic_max_size from 100/50 to 150/75 bytes

* Faster and safer compare in cmpToMainTopic()
This commit is contained in:
Bad authored and GitHub committed 2022-07-19 07:52:46 +02:00
1 parent 0f57eddb01
commit 612c3f6322
2 files changed
+23 -19

No files matched your search

+2 -2
View File
@@ -144,7 +144,7 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
//MQTT Parameters definition
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
# define parameters_size 60
# define mqtt_topic_max_size 100
# define mqtt_topic_max_size 150
# ifndef mqtt_max_packet_size
# ifdef MQTT_HTTPS_FW_UPDATE
# define mqtt_max_packet_size 2560
@@ -154,7 +154,7 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
# endif
#else
# define parameters_size 30
# define mqtt_topic_max_size 50
# define mqtt_topic_max_size 75
# define mqtt_max_packet_size 128
#endif