Show SSID in logs

This commit is contained in:
Matt
2025-12-14 23:52:29 +00:00
parent 7e16498788
commit f3f6b96bc9
2 changed files with 5 additions and 2 deletions

View File

@@ -300,7 +300,7 @@ static void show_status_led() {
#ifdef CONFIG_BSP_CONFIG_GPIO
if (!is_ap && gpio_get_level(CONFIG_BSP_CONFIG_GPIO) == 0) {
if (now - reset_pressed_time > 1000) {
ESP_LOGW(TAG, "Factory Reset Triggered via GPIO %d", CONFIG_BSP_CONFIG_GPIO);
ESP_LOGW(TAG, "Reset to WiFi-AP mode triggered via GPIO %d", CONFIG_BSP_CONFIG_GPIO);
wifi_manager_erase_config();
esp_restart();
} else {

View File

@@ -33,6 +33,9 @@ static httpd_handle_t s_server_handle = NULL;
#define AP_SSID "ESP-Scope"
#define AP_PASS ""
// Current NVS specified ssid
static char ssid[33] = {0};
// Forward decls
static void wifi_init_softap(void);
@@ -321,9 +324,9 @@ bool wifi_manager_init_wifi(void) {
// 2. Check NVS
nvs_handle_t nvs_handle;
char ssid[33] = {0};
char pass[64] = {0};
size_t ssid_len = sizeof(ssid);
memset(ssid, 0, sizeof ssid);
size_t pass_len = sizeof(pass);
bool has_creds = false;