Rework sequences (engine, seqplay, envelope, API, web UI), add bridge support, add the host sim-controller and rig simulation tests, and update docs, presets and project tooling config. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
785 B
C
22 lines
785 B
C
#pragma once
|
|
|
|
// UDP bridge: carries the controller's ESP-NOW frames to a host that stands in for the radio, such as
|
|
// led-simulator (settings "bridge": "host:port"). Down: dst_mac(6) + packet. Up: src_mac(6) + packet.
|
|
// While it runs, nothing goes out over the air.
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
typedef void (*bridge_rx_cb_t)(const uint8_t *src_mac, const uint8_t *data, int len);
|
|
|
|
#define BRIDGE_DEFAULT_PORT 8766
|
|
|
|
// addr "host" or "host:port". Starts the receive task; frames arrive on cb.
|
|
esp_err_t bridge_start(const char *addr, bridge_rx_cb_t cb);
|
|
bool bridge_active(void);
|
|
esp_err_t bridge_send(const uint8_t *dst_mac, const void *data, size_t len);
|
|
// "host:port" while active, else NULL
|
|
const char *bridge_addr(void);
|