diff --git a/stage/map.json b/stage/map.json index e331890..86aba55 100644 --- a/stage/map.json +++ b/stage/map.json @@ -27,7 +27,7 @@ "universe": 0, "address": 87, "channels": 8, - "direction": 90 + "direction": 71 }, "#2": { "x": -3.5, @@ -38,7 +38,7 @@ "universe": 0, "address": 95, "channels": 8, - "direction": 90 + "direction": 105 }, "#3": { "x": -1.8, @@ -93,7 +93,7 @@ "universe": 0, "address": 135, "channels": 8, - "direction": -72 + "direction": -103 }, "#8": { "x": 3.5, @@ -104,7 +104,7 @@ "universe": 0, "address": 143, "channels": 8, - "direction": -90 + "direction": -72 }, "M1": { "x": -0.3, diff --git a/tests/test_simulator.py b/tests/test_simulator.py index 6b74e91..be37ff5 100644 --- a/tests/test_simulator.py +++ b/tests/test_simulator.py @@ -59,7 +59,7 @@ def test_xchc_patch_matches_the_stage_map(): assert by_id["M3"].address == 257 and by_id["M3"].channels == 43 assert by_id["M3"].x == -1.75 and by_id["M3"].y == -7.65 assert by_id["M4"].address == 300 and by_id["M4"].x == 1.75 - assert by_id["#1"].direction == 90 and by_id["#8"].direction == -90 + assert by_id["#1"].direction == 71 and by_id["#8"].direction == -72 assert by_id["#3"].direction == 0 and by_id["#14"].direction == -179 assert by_id["M1"].zero == 0 and by_id["M4"].zero == 0 assert stage.warnings == [] @@ -215,13 +215,14 @@ def test_http_state_follows_artnet(): def test_heading_is_stored_in_the_map(tmp_path): target = tmp_path / "map.json" target.write_text((ROOT / "stage" / "map.json").read_text()) + before = json.loads(target.read_text())["fixtures"] stage = load_stage(target) assert wrap_degrees(270) == -90 set_heading(stage, "#1", direction=45) set_heading(stage, "M1", zero=-30) saved = json.loads(target.read_text()) assert saved["fixtures"]["#1"]["direction"] == 45 - assert saved["fixtures"]["#2"]["direction"] == 90 + assert saved["fixtures"]["#2"]["direction"] == before["#2"]["direction"] assert saved["fixtures"]["M1"]["zero"] == -30 assert saved["fixtures"]["M2"]["zero"] == 0 again = load_stage(target)