Public Access
- lib/apps_model (host-tested): SettingsMenu (rows, readable values, choices, validation messages) and SetupWizard (names, Region confirmation, timezone; saves only when finished) - AppManager: modal Apps that Home/Back can't leave (setup wizard) - SettingsApp: all settings plus Storage (usage, erase SD behind a dialog) and About (version, node id, battery, memory, uptime) pages, replacing the temporary Diagnostics App - SetupApp: first-boot wizard, opened modally until SetupDone - Node id and default names derived from the MAC like Meshtastic - Widget demo is now hidden (About, then w) - lib_ldf_mode = deep+ so libraries see each other's headers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
27 lines
803 B
C++
27 lines
803 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
#include "key_value_store.h"
|
|
|
|
// In-memory KeyValueStore for tests.
|
|
struct MemoryStore : roro::KeyValueStore {
|
|
std::map<std::string, int32_t> ints;
|
|
std::map<std::string, std::string> strings;
|
|
bool getInt(const char* key, int32_t& out) override {
|
|
auto it = ints.find(key);
|
|
if (it == ints.end()) return false;
|
|
out = it->second;
|
|
return true;
|
|
}
|
|
bool getString(const char* key, std::string& out) override {
|
|
auto it = strings.find(key);
|
|
if (it == strings.end()) return false;
|
|
out = it->second;
|
|
return true;
|
|
}
|
|
void putInt(const char* key, int32_t v) override { ints[key] = v; }
|
|
void putString(const char* key, const std::string& v) override { strings[key] = v; }
|
|
};
|