Moves the controller, bridge and led-driver default ESP-NOW channel to 11 and updates the led-driver and led-tool submodule pointers. Includes the rest of the working tree: web UI, desktop and sim-controller changes, API and bridge code, graphify output, and the .gitea and fixture-driver folders. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
37 lines
1.6 KiB
C
37 lines
1.6 KiB
C
/*
|
|
* The simulated rig's network fixtures: Art-Net (UDP 6454) and DDP (UDP 4048, or the ports the room's DDP
|
|
* fixtures name) received here and forwarded to the rig page over /sim/ws, at most 40 frames a second:
|
|
*
|
|
* here -> page binary 0x01 + u16 universe (LE) + 512 bytes an Art-Net universe changed
|
|
* here -> page binary 0x02 + u16 port (LE) + u32 0 + RGB bytes a DDP port's pixels changed (from offset 0)
|
|
*
|
|
* The ESP-NOW frames to the page carry 0x00 in front (sim_rig.c). ArtPoll is answered so QLC+ lists the node.
|
|
* LED_SIM_ARTNET_PORT moves the Art-Net port (0: off), for when QLC+ on the same machine holds 6454.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "cJSON.h"
|
|
|
|
#define SIM_NET_MAX_DDP_PORTS 8
|
|
#define SIM_NET_DDP_PIXELS 4096
|
|
|
|
// Start the receiver task (once)
|
|
void sim_net_start(void);
|
|
|
|
// A universe from inside the controller (a DMX bridge's Simulator output), as if it arrived over Art-Net.
|
|
// Does nothing before sim_net_start.
|
|
void sim_net_put_universe(int uni, const uint8_t data[512]);
|
|
|
|
// The DDP ports the active room uses (duplicates and 0 are ignored); sockets follow on the next tick
|
|
void sim_net_set_ddp_ports(const uint16_t *ports, int n);
|
|
|
|
// {artnet: {port, error, packets, polls, local_packets, last_from, universes: {"0": {packets, data?: hex}}},
|
|
// ddp: {"4048": {packets, pixels, error, last_from, data?: hex}}}; data only when with_data
|
|
cJSON *sim_net_status(bool with_data);
|
|
|
|
// sim_rig.c: send one binary frame to the page; false when no page is open
|
|
bool sim_rig_page_send(const uint8_t *frame, size_t len);
|