feat: DDP frame sync over UDP broadcast, DDP acks, DDP enable setting

- Driver acks each completed DDP frame; the test waits for the acks before broadcasting the sync.
- Sync listener on UDP 4049: a frame is held until the next sync, then shown.
- DDP pixels are shown at full brightness, ignoring the device brightness settings.
- "DDP and sync receive on" setting (NVS, network API, web UI); off ignores DDP and sync packets.
- ddp_test.py: finds devices on the subnet, drives them in lockstep at a fixed rate, runs animations.
- /api/ddp reports sync counters for diagnosis.
- Includes in-progress WebSocket, multi-driver web UI and Wi-Fi work from the same tree.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-11 14:10:55 +13:00
1 parent 47f4eba0d6
commit 4cd3bc7973
294 files changed
+48954 -301

No files matched your search

+16
View File
@@ -41,10 +41,22 @@ void patterns_select(const preset_t &p);
/** @brief DDP pixel data for the strip: byte offset into the RGB buffer, data, length. Replaces the pattern. */
void patterns_ddp_write(uint32_t offset, const uint8_t *data, size_t len, bool push);
void patterns_ddp_sync(uint32_t seq);
/** @brief Whether DDP pixels are arriving, and how many packets have come in. */
void patterns_ddp_status(bool *active, uint32_t *packets);
/** @brief Frame sync counters, for diagnosing the sync test. */
typedef struct {
uint32_t syncs; // sync packets received
uint32_t sync_seq; // seq of the last sync
uint32_t sync_age_ms; // ms since the last sync (UINT32_MAX: never)
uint32_t frames; // DDP frames completed (PUSH)
uint32_t shown; // frames shown on the strip
bool held; // a frame is waiting for the next sync
} patterns_ddp_debug_t;
void patterns_ddp_debug(patterns_ddp_debug_t *out);
/** @brief The colour last shown on LED i, as RGB. */
void patterns_shown_pixel(int i, uint8_t out[3]);
@@ -52,6 +64,10 @@ void patterns_shown_pixel(int i, uint8_t out[3]);
void patterns_set_global(uint8_t level);
uint8_t patterns_get_global(void);
/** @brief Master scale for this device, 0-255: multiplies the device brightness (under the max brightness ceiling). */
void patterns_set_master(uint8_t level);
uint8_t patterns_get_master(void);
/** @brief Copy of the preset being shown. */
void patterns_get(preset_t *out);