feat: ESP-NOW link, beat sync and control messages in the C++ driver

- espnow_link, ctrl_msg and beat_sync: the reliable link, envelopes and
  beat-synced timing.
- ctrl_msg: accept an envelope with the trailing save byte.
- patterns_frame() and espnow_link_poll() split out of their tasks, so the
  WebAssembly simulator can drive one frame and one link pass from a timer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-16 19:32:36 +13:00
1 parent 94e300f6ad
commit 24dd5ffb15
30 files changed
+2159 -158

No files matched your search

+4 -2
View File
@@ -92,8 +92,8 @@ int nz(int v, int def); // v when v > 0, else def
rgb mk(int r, int g, int b); // clamped
rgb ab(rgb c, int level); // c scaled by level/255
rgb mix(rgb a, rgb b, int k); // a -> b, k 0..255
int sgn(const fx_t &f, int v); // v, negated when reversed
int led_at(const fx_t &f, int i); // logical index -> physical (reverse)
int sgn(const fx_t &f, int v); // v unchanged; reverse is applied in led_at only
int led_at(const fx_t &f, int i); // logical index -> physical (mirrors when reverse)
void put(fx_t &f, int phys, rgb c);
void putl(fx_t &f, int logical, rgb c);
void fill(fx_t &f, rgb c);
@@ -121,6 +121,7 @@ bool fx_chase(fx_t &f, st_t &s);
bool fx_circle(fx_t &f, st_t &s);
bool fx_clock_sweep(fx_t &f, st_t &s);
bool fx_colour_cycle(fx_t &f, st_t &s);
bool fx_rainbow(fx_t &f, st_t &s);
bool fx_flicker(fx_t &f, st_t &s);
bool fx_gradient_wipe(fx_t &f, st_t &s);
bool fx_hit(fx_t &f, st_t &s);
@@ -129,6 +130,7 @@ bool fx_keyframes(fx_t &f, st_t &s);
bool fx_orbit(fx_t &f, st_t &s);
bool fx_pulse(fx_t &f, st_t &s);
bool fx_transition(fx_t &f, st_t &s);
bool fx_wipe(fx_t &f, st_t &s);
bool fx_strobe_burst(fx_t &f, st_t &s);
bool fx_plasma(fx_t &f, st_t &s);