Files
led-controller/sim-controller/components/sim/CMakeLists.txt
T
jimmyandClaude Opus 5.5 35207a868a sim: fixture editor for DDP and Art-Net/DMX fixtures
The rig sim receives Art-Net (UDP 6454, answers ArtPoll) and DDP (each port the
room's DDP strips use) in sim_net.c and passes changed universes and pixels to
the page over /sim/ws, now with a kind byte in front of each binary frame.

Rooms gain fixture types: ddp strips, artnet pixel strips, and artnet cans and
movers that read named channels from the room's dmx_definitions (the qlcplus
stage map's format). Overlapping DMX channels are refused. Cans and movers are
decoded and drawn as in the qlcplus stage simulator (dmx.js, dmx-draw.js).

In Edit mode: pick a type to add, edit port/offset/universe/address/colour
order/definition, see a can's or mover's live channels, make a controller
output aimed at the sim and send its test. The room dialog lists DMX
definitions, with presets, a channel editor, and .qxf and stage map import.

GET /sim/api/dmx shows what the receiver has had. Tests: test/api/test_sim_net.py
and test/browser/dmx_decode.test.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:13:58 +13:00

15 lines
814 B
CMake

idf_component_register(SRCS "sim_main.c" "sim_stubs.c" "sim_timer.c" "sim_rig.c" "sim_net.c"
INCLUDE_DIRS "include" "."
REQUIRES esp_http_server esp_timer esp_event cjson main freertos)
target_link_libraries(${COMPONENT_LIB} INTERFACE m)
# main's objects need esp_timer and libm, which come after it on the link line: link sim (and libm) last
target_link_libraries(__idf_main INTERFACE ${COMPONENT_LIB} m)
# The simulated rig's page and drivers (tools/build_sim_web.sh), served at /sim/. Without it the program still
# builds: an empty pack, and /sim/ says how to build the rig.
set(SIM_PACK ${COMPONENT_DIR}/../../../www_dist/sim.pack)
if(NOT EXISTS ${SIM_PACK})
file(WRITE ${SIM_PACK} "WWW1")
endif()
target_add_binary_data(${COMPONENT_LIB} ${SIM_PACK} BINARY)