Implement Phase 7C local status dashboard
Add fixed status icons, OLED dimming and wake behavior, lowercase glyphs, and access-point metadata tracking. Update validation guidance, roadmap status, and provide an icon layout mockup with licensing.
This commit is contained in:
+14
-7
@@ -233,12 +233,17 @@ static uint8_t build_profile_order(uint8_t *order, const wifi_app_config_t *conf
|
||||
return count;
|
||||
}
|
||||
|
||||
static void note_ap_running(bool running, uint8_t channel)
|
||||
static void note_ap_running(bool running, const wifi_app_config_t *config)
|
||||
{
|
||||
lock_shared();
|
||||
bool changed = s_shared.snapshot.ap_running != running;
|
||||
s_shared.snapshot.ap_running = running;
|
||||
s_shared.snapshot.ap_channel = channel;
|
||||
s_shared.snapshot.ap_channel = config->ap_channel;
|
||||
if (running) {
|
||||
s_shared.snapshot.ap_ssid_len = config->ap_ssid_len;
|
||||
memset(s_shared.snapshot.ap_ssid, 0, sizeof(s_shared.snapshot.ap_ssid));
|
||||
memcpy(s_shared.snapshot.ap_ssid, config->ap_ssid, config->ap_ssid_len);
|
||||
}
|
||||
if (!running) {
|
||||
s_shared.snapshot.ap_client_count = 0U;
|
||||
}
|
||||
@@ -325,7 +330,7 @@ static esp_err_t set_runtime_ap_enabled(manager_runtime_t *runtime, bool enabled
|
||||
}
|
||||
if (error == ESP_OK) {
|
||||
runtime->ap_enabled = true;
|
||||
note_ap_running(true, config.ap_channel);
|
||||
note_ap_running(true, &config);
|
||||
} else {
|
||||
/* Do not leave an untracked default/stale AP active after failure. */
|
||||
esp_err_t rollback_error = esp_wifi_set_mode(WIFI_MODE_STA);
|
||||
@@ -338,7 +343,7 @@ static esp_err_t set_runtime_ap_enabled(manager_runtime_t *runtime, bool enabled
|
||||
error = esp_wifi_set_mode(WIFI_MODE_STA);
|
||||
if (error == ESP_OK) {
|
||||
runtime->ap_enabled = false;
|
||||
note_ap_running(false, config.ap_channel);
|
||||
note_ap_running(false, &config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +384,7 @@ static void stop_radio(manager_runtime_t *runtime)
|
||||
wifi_app_config_t config;
|
||||
copy_working_config(&config);
|
||||
if (runtime->ap_enabled) {
|
||||
note_ap_running(false, config.ap_channel);
|
||||
note_ap_running(false, &config);
|
||||
}
|
||||
wifi_config_secure_wipe(&config, sizeof(config));
|
||||
|
||||
@@ -551,7 +556,7 @@ static void start_radio_and_policy(manager_runtime_t *runtime)
|
||||
runtime->radio_started = true;
|
||||
runtime->ap_enabled = want_ap;
|
||||
set_last_error(ESP_OK);
|
||||
note_ap_running(want_ap, config.ap_channel);
|
||||
note_ap_running(want_ap, &config);
|
||||
|
||||
if (runtime->profile_count == 0U) {
|
||||
set_active_profile(-1, NULL);
|
||||
@@ -1178,6 +1183,9 @@ esp_err_t wifi_manager_init(const wifi_app_config_t *config)
|
||||
s_shared.snapshot.state = WIFI_MANAGER_STATE_STOPPED;
|
||||
s_shared.snapshot.active_profile = -1;
|
||||
s_shared.snapshot.ap_policy = config->ap_policy;
|
||||
s_shared.snapshot.ap_ssid_len = config->ap_ssid_len;
|
||||
memcpy(s_shared.snapshot.ap_ssid, config->ap_ssid, config->ap_ssid_len);
|
||||
s_shared.snapshot.ap_ssid[config->ap_ssid_len] = '\0';
|
||||
s_shared.snapshot.ap_channel = config->ap_channel;
|
||||
s_shared.snapshot.sta_auth = WIFI_AUTH_OPEN;
|
||||
s_shared.snapshot.last_error = ESP_OK;
|
||||
@@ -1302,7 +1310,6 @@ esp_err_t wifi_manager_apply_working_config(const wifi_app_config_t *config)
|
||||
s_shared.snapshot.config_generation = 1U;
|
||||
}
|
||||
s_shared.snapshot.ap_policy = config->ap_policy;
|
||||
s_shared.snapshot.ap_channel = config->ap_channel;
|
||||
++s_shared.snapshot.counters.applies;
|
||||
unlock_shared();
|
||||
return ESP_OK;
|
||||
|
||||
Reference in New Issue
Block a user