Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Aug 14, 2024
1 parent 88f3139 commit f860793
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions LedProcesses/LedFX.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#pragma once
#include <halp/controls.hpp>
#include <halp/meta.hpp>
#include <rnd/random.hpp>

#include <algorithm>
#include <vector>

namespace Led
{
struct led_stripe_port
{
halp_flags(buffer, led_stripe);
std::vector<uint8_t> value; // In string ?
};

struct LedFX
{
halp_meta(name, "LedFX")
halp_meta(c_name, "LedFX")
halp_meta(category, "UI")
halp_meta(author, "Jean-Michaël Celerier")
halp_meta(description, "LedFX")
halp_meta(uuid, "62bc0879-0b3d-436f-bdd6-7d56db3c2a2f")

struct
{
} inputs;

struct
{
struct
{
halp_flags(buffer, led_stripe);
std::vector<uint8_t> value; // In string ?
} stripe;
} outputs;

void operator()()
{
outputs.stripe.value.resize(12 * 3);
for (int i = 0; i < 12 * 3; i++)
outputs.stripe.value[i] = r();
}

std::random_device dev;
rnd::pcg r{dev};
};
}

0 comments on commit f860793

Please sign in to comment.