Add Typed Display Settings Administration
Implements admin-only Display settings with generation-checked Apply, Save, Load, Defaults, and Reset operations across the web UI, CLI, SSH dispatcher, and local UI owner. Adds bounded HTTP handling, session-isolated operation results, browser lifecycle support, and comprehensive host tests and documentation.
This commit is contained in:
@@ -21,6 +21,22 @@ esp_err_t local_status_ui_start(const local_ui_config_t *config);
|
||||
esp_err_t local_status_ui_get_config(local_ui_config_t *config);
|
||||
esp_err_t local_status_ui_apply_config(const local_ui_config_t *config);
|
||||
|
||||
typedef enum {
|
||||
LOCAL_UI_SETTINGS_APPLY, LOCAL_UI_SETTINGS_SAVE, LOCAL_UI_SETTINGS_LOAD,
|
||||
LOCAL_UI_SETTINGS_DEFAULTS, LOCAL_UI_SETTINGS_RESET
|
||||
} local_ui_settings_action_t;
|
||||
|
||||
/* Zero-wait RAM projection. Generation is nonzero and never wraps. */
|
||||
esp_err_t local_status_ui_get_settings(local_ui_config_t *config, uint32_t *generation);
|
||||
/* Reserve configuration across storage IO, without holding a critical section.
|
||||
* Zero expected_generation is for canonical unconditional CLI operations only.
|
||||
* Nonzero stale generations return ESP_ERR_INVALID_STATE; contention returns
|
||||
* ESP_ERR_TIMEOUT. Load retains the canonical default fallback. Reset commits
|
||||
* defaults before publishing RAM, so a storage failure needs no RAM rollback.
|
||||
* No display IO occurs here; successful RAM changes signal renderer activity. */
|
||||
esp_err_t local_status_ui_update_settings(local_ui_settings_action_t action,
|
||||
uint32_t expected_generation, const local_ui_config_t *config, bool *loaded_defaults);
|
||||
|
||||
/* Preserve a manually selected display diagnostic for a bounded interval. */
|
||||
void local_status_ui_hold_for_diagnostics(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user