fix: Engine-Grenzen für Segmente und Blink-Anzahl

This commit is contained in:
Michael Sauer
2026-09-11 13:17:21 +02:00
parent 73a7f31cb6
commit 472d2398ac
3 changed files with 18 additions and 0 deletions
+4
View File
@@ -38,6 +38,8 @@ static int32_t lerp(int32_t a, int32_t b, uint32_t e, uint32_t d)
static void push(const nl_visual_t *from, const nl_visual_t *to, uint32_t dur)
{
if (s_nseg >= sizeof s_seg / sizeof s_seg[0])
return;
seg_t *s = &s_seg[s_nseg++];
s->from = *from;
s->to = *to;
@@ -165,6 +167,8 @@ void nl_engine_current(nl_visual_t *out)
void nl_engine_blink(uint8_t count)
{
if (count > NL_BLINK_MAX)
count = NL_BLINK_MAX;
s_blink_left = (uint8_t)(count * 2u);
s_blink_t = 0;
emit();
+1
View File
@@ -8,6 +8,7 @@
#include "light/nl_light_types.h"
#define NL_BLINK_PHASE_MS 300u
#define NL_BLINK_MAX 100u
#define NL_PULSE_PERIOD_MS 3000u
typedef void (*nl_output_fn)(const uint8_t ch[NL_CH_COUNT], void *ctx);