Files
led-hoop/c/lib/leds/preset.hpp
T
jimmyandClaude Opus 5.5 bf0429c505 Embed gzipped web assets at build time and type LED edit commands.
Generate the web UI headers from c/web/ via scripts/embed_file.py (minify + gzip) and serve them with Content-Encoding, replacing the checked-in web_*.h blobs. Move the LED driver/presets into lib/leds, and parse preset edits into a typed cmd_preset_t on core0 instead of passing raw JSON to core1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:18:10 +13:00

27 lines
481 B
C++

#pragma once
#include <array>
#include <cstdint>
#include <string>
#include <vector>
struct RGB {
uint8_t r = 0;
uint8_t g = 0;
uint8_t b = 0;
};
class Preset {
public:
std::string p = "off";
int d = 100;
int b = 127;
std::vector<RGB> c{{255, 255, 255}};
bool a = true;
int n1 = 0, n2 = 0, n3 = 0, n4 = 0;
int n5 = 0, n6 = 0, n7 = 0, n8 = 0;
Preset() = default;
explicit Preset(std::string pattern) : p(std::move(pattern)) {}
};