[WebUI] Show the active modules as text in the page heading (#2406)

Every page heading printed the modules JSON array as is
(["LilyGo_SSD1306","WebUI","LORA"]). Show it as a comma separated list.
The heading buffer was also filled with serializeJson(modules, jsonChar,
measureJson(modules) + 1), i.e. the size of the text rather than of the
100 bytes buffer, which overflows when many modules are enabled; the new
helper (and the boot log) use the buffer size.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pwshandClaude Opus 5.5 authored and GitHub committed 2026-10-12 06:50:14 -05:00
1 parent eb1e7c71e6
commit 3ec01a72fd
2 files changed
+37 -23

No files matched your search

+1 -1
View File
@@ -1646,7 +1646,7 @@ void setup() {
THEENGS_LOG_TRACE(F("mqtt_max_payload_size: %d" CR), mqtt_max_payload_size);
SYSConfig.offline ? THEENGS_LOG_NOTICE(F("Offline enabled" CR)) : THEENGS_LOG_NOTICE(F("Offline disabled" CR));
char jsonChar[100];
serializeJson(modules, jsonChar, measureJson(modules) + 1);
serializeJson(modules, jsonChar, sizeof(jsonChar));
THEENGS_LOG_NOTICE(F("OpenMQTTGateway modules: %s" CR), jsonChar);
THEENGS_LOG_NOTICE(F("************** Setup OpenMQTTGateway end **************" CR));
}