able to write and read from nvs; completed topology test main

This commit is contained in:
superkor
2026-01-24 22:17:27 -05:00
committed by Johnathon Slightham
parent e077c616a3
commit 3c6f8b2c86
8 changed files with 181 additions and 31 deletions

View File

@@ -6,6 +6,7 @@
#define MOVEMENTS_NVS_NAMESPACE "movements"
#define MOVEMENTS_NVS_KEY "key"
#define MOVEMENTS_NVS_TOPOLOGY_KEY "topology"
#define MOVEMENTS_NVS_TOPOLOGY_DATA_SIZE_KEY "data_size"
#define MOVEMENTS_DEBUG_TAG "movements"
class MovementManager {

View File

@@ -5,9 +5,9 @@
#include <unordered_map>
#include <unordered_set>
// move these to constants header file?
#include "RMTManager.h"
#include "DataLinkManager.h"
#include "constants/rmt.h"
#include "constants/datalink.h"
#include "Frames.h"
#include "TopologyBuilder.h"
#include <vector>
@@ -26,7 +26,7 @@ class TopologyManager {
esp_err_t verify_topology();
esp_err_t get_curr_topology(std::unordered_map<uint16_t, std::vector<std::pair<uint8_t, uint16_t>>>& topology);
esp_err_t write_nvs_topology();
esp_err_t get_nvs_topology(std::unordered_map<uint16_t, std::vector<Topology::ChannelBoardConn>>& topology);
esp_err_t get_nvs_topology(std::unordered_map<uint16_t, std::vector<std::pair<uint8_t, uint16_t>>>& topology);
private:
std::unordered_map<uint16_t, std::vector<Topology::ChannelBoardConn>> topology;