Fix MQTT startup after ESP32 WebConfig provisioning

This commit is contained in:
mikecarper committed 2026-10-06 19:28:10 -07:00
1 parent 86d74c4a13
commit d4b7217a4b
18 files changed
+1018 -208

No files matched your search

+15 -8
View File
@@ -1,5 +1,6 @@
#pragma once
// Shared browser configuration portal for ESP32 infrastructure and WiFi
// companion builds. The UI removes MQTT controls when no bridge is present.
//
@@ -24,6 +25,8 @@
#define WITH_WEBCONFIG 1
#include <helpers/esp32/WiFiCredentials.h>
#include <Arduino.h>
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
@@ -201,23 +204,27 @@ public:
static bool saveCliEnabled(bool enabled);
static bool loadStandaloneWiFi(char* ssid, size_t ssid_len,
char* password, size_t password_len,
uint8_t* power_save = NULL);
uint8_t* power_save = NULL, const void* legacy_prefs = NULL);
static bool hasConfiguredWiFi(const void* legacy_prefs = NULL);
static mesh::wifi::CredentialState resolveWiFi(mesh::wifi::Credentials& out,
const void* legacy_prefs = NULL);
static bool saveStandaloneWiFi(const char* ssid, const char* password,
uint8_t power_save);
static bool setStandaloneWiFiSSID(const char* value, char* reply,
size_t reply_len);
size_t reply_len, const void* legacy_prefs = NULL);
static bool setStandaloneWiFiPassword(const char* value, char* reply,
size_t reply_len);
size_t reply_len, const void* legacy_prefs = NULL);
static bool setStandaloneWiFiPowerSave(const char* value, char* reply,
size_t reply_len);
size_t reply_len, const void* legacy_prefs = NULL);
static bool setWiFiCliEnabled(const char* value, char* reply,
size_t reply_len);
static bool formatWiFiSSID(char* reply, size_t reply_len);
static bool formatWiFiPassword(char* reply, size_t reply_len);
static bool formatWiFiSSID(char* reply, size_t reply_len, const void* legacy_prefs = NULL);
static bool formatWiFiPassword(char* reply, size_t reply_len, const void* legacy_prefs = NULL);
static bool formatWiFiStatus(
char* reply, size_t reply_len,
const mesh::wifi::CompanionWiFiRuntimeState* companion_runtime = NULL);
static bool formatWiFiPowerSave(char* reply, size_t reply_len);
const mesh::wifi::CompanionWiFiRuntimeState* companion_runtime = NULL,
const void* legacy_prefs = NULL);
static bool formatWiFiPowerSave(char* reply, size_t reply_len, const void* legacy_prefs = NULL);
static bool formatWiFiCliStatus(char* reply, size_t reply_len);
// UI tasks use an otherwise-unused multi-click gesture without reaching into