feat: add SD-backed stats archive and dedicated /stats web console

This commit is contained in:
Jared Dohrman
2026-04-15 17:12:32 +10:00
parent a1aa318352
commit f67aaebe7e
27 changed files with 3862 additions and 588 deletions
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include <helpers/IdentityStore.h>
#include <stdint.h>
struct NetworkPrefs {
uint32_t magic;
uint8_t wifi_powersave;
uint8_t reserved[3];
char wifi_ssid[33];
char wifi_pwd[65];
};
class NetworkPrefsStore {
public:
static void setDefaults(NetworkPrefs& prefs);
static bool load(FILESYSTEM* fs, NetworkPrefs& prefs,
uint8_t legacy_wifi_powersave = 0,
const char* legacy_wifi_ssid = nullptr,
const char* legacy_wifi_pwd = nullptr);
static bool save(FILESYSTEM* fs, const NetworkPrefs& prefs);
private:
static constexpr uint32_t kMagic = 0x4E455450;
static constexpr const char* kFilename = "/network_prefs";
};