new persistence manager component

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-06-23 23:10:42 +02:00
parent c6f0c4572d
commit 0c8c831eea
16 changed files with 92 additions and 119 deletions

View File

@@ -5,6 +5,7 @@ if (DEFINED ENV{IDF_PATH})
PRIV_REQUIRES
u8g2
esp_event
persistence-manager
)
return()
endif ()
@@ -23,4 +24,5 @@ target_include_directories(${PROJECT_NAME} PUBLIC include)
target_link_libraries(${PROJECT_NAME} PRIVATE
SDL3::SDL3
persistence-manager
)

View File

@@ -1,4 +1,5 @@
#pragma once
#include "SDL3/SDL_render.h"
#include <cstdint>
@@ -12,7 +13,7 @@ class Matrix
void Render() const;
SDL_WindowID windowId() const;
[[nodiscard]] SDL_WindowID windowId() const;
private:
void DrawColoredGrid() const;

View File

@@ -1,6 +1,6 @@
#pragma once
#include "stdint.h"
#include <cstdint>
enum
{
@@ -15,8 +15,8 @@ typedef struct
int value;
} led_event_data_t;
uint64_t wled_init(void);
uint64_t wled_init();
uint64_t register_handler(void);
uint64_t register_handler();
uint64_t send_event(uint32_t event, led_event_data_t *payload);

View File

@@ -1,4 +1,4 @@
#include "../../include/Matrix.h"
#include "Matrix.h"
#include "SDL3/SDL.h"
@@ -36,7 +36,7 @@ void Matrix::DrawColoredGrid() const
h = m_rows - 1 - h_raw;
}
const auto rectSize = cellSize - 2.0f * spacing;
constexpr auto rectSize = cellSize - 2.0f * spacing;
const auto x = static_cast<float>(w) * cellSize + spacing;
const auto y = static_cast<float>(h) * cellSize + spacing;