Fix TCPConsole to use runtime NodePrefs password instead of compile-time ADMIN_PASSWORD

This commit is contained in:
Piero Andreini 2026-03-31 17:23:47 +02:00
parent b2be547c33
commit b849d1c01b
4 changed files with 20 additions and 11 deletions

View file

@ -5,7 +5,7 @@
#if defined(ESP32) && defined(TCP_CONSOLE_PORT)
#include <helpers/esp32/TCPConsole.h>
TCPConsole tcp_console(ADMIN_PASSWORD, ADVERT_NAME);
TCPConsole tcp_console(nullptr); // prefs set in setup()
#endif
#ifdef DISPLAY_CLASS
@ -81,6 +81,8 @@ void setup() {
the_mesh.begin(fs);
tcp_console.setPrefs(the_mesh.getNodePrefs());
#ifdef DISPLAY_CLASS
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
#endif