- 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>
23 lines
689 B
C
23 lines
689 B
C
/*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Minimal WebSocket client for talking to another driver. One connection is kept open per peer.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
#include "esp_err.h"
|
|
|
|
/** @brief Open (or reuse) a WebSocket to host:/ws. Returns the socket, or -1. */
|
|
int ws_client_connect(const char *host, const char *path);
|
|
|
|
/** @brief Send one text frame. */
|
|
esp_err_t ws_client_send_text(int fd, const char *data, size_t len);
|
|
|
|
/** @brief Receive one text frame into buf (NUL-terminated). Returns the length, or -1 on error. */
|
|
int ws_client_recv_text(int fd, char *buf, size_t cap);
|
|
|
|
/** @brief Close a socket from ws_client_connect. */
|
|
void ws_client_close(int fd);
|