feat: sequences v2, bridges, and sim-controller
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>
This commit is contained in:
1 parent
d664026ee5
commit
2543673bd8
68 files changed
+5761
-460
No files matched your search
@@ -146,3 +146,28 @@ def test_update_groups(c):
|
||||
assert data["total"] == len(espnow)
|
||||
assert data["sent"] + data["failed"] == data["total"]
|
||||
assert resp.status_code == (200 if data["failed"] == 0 else 503)
|
||||
|
||||
|
||||
def test_layout_saves_and_clears_placement(c, espnow_dev):
|
||||
resp = c.post("/devices/layout", json={"placements": {"aa:bb:cc:dd:ee:ff": {"x0": 100, "y0": 200, "x1": 300, "y1": 200}}})
|
||||
assert resp.status_code == 200, resp.text
|
||||
assert resp.json()["updated"] == 1 and resp.json()["sent"] >= 1 # this driver is placed, so it is sent
|
||||
dev = c.get(f"/devices/{ESPNOW_MAC}").json()
|
||||
assert dev["placement"] == {"x0": 100, "y0": 200, "x1": 300, "y1": 200}
|
||||
resp = c.post("/devices/layout", json={"placements": {ESPNOW_MAC: None}})
|
||||
assert resp.json()["updated"] == 1
|
||||
assert "placement" not in c.get(f"/devices/{ESPNOW_MAC}").json()
|
||||
|
||||
|
||||
def test_layout_needs_placements(c):
|
||||
assert c.post("/devices/layout", json={}).status_code == 400
|
||||
# Unknown devices and bad placements are skipped
|
||||
resp = c.post("/devices/layout", json={"placements": {"010203040506": {"x0": 1, "y0": 1, "x1": 2, "y1": 2},
|
||||
ESPNOW_MAC: {"x0": "a"}}})
|
||||
assert resp.status_code == 200 and resp.json()["updated"] == 0
|
||||
|
||||
|
||||
def test_layout_keeps_rig_center(c, espnow_dev):
|
||||
resp = c.post("/devices/layout", json={"placements": {}, "center": {"x": 500, "y": 350}})
|
||||
assert resp.status_code == 200
|
||||
assert c.get("/settings").json()["rig_center"] == {"x": 500, "y": 350}
|
||||
Reference in new issue
Block a user