feat(web/nvs): Add full Flash NVS manager, multi-trigger remap UI (click/long/double), and self-healing storage engine

This commit is contained in:
cuicuiV5 committed 2026-08-31 17:01:22 +08:00
1 parent c24c31bca3
commit 00e0b683aa
7 files changed
+1175 -142

No files matched your search

+10
View File
@@ -12,6 +12,9 @@
#include "cli/cli_manager.h"
#include "led_indicator.h"
#include <nvs_flash.h>
#include <nvs.h>
key_mapper_engine_t g_key_engine;
// Task running on Core 0: BLE Central & Audio Decoding
@@ -27,6 +30,13 @@ static void ble_task_core0(void* param) {
}
void setup() {
// 0. Initialize Flash NVS with auto-recovery for corrupted partitions
esp_err_t nvs_err = nvs_flash_init();
if (nvs_err == ESP_ERR_NVS_NO_FREE_PAGES || nvs_err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
nvs_flash_erase();
nvs_flash_init();
}
// 1. Initialize Log System first
app_log_init();