RESI VOX reads what each page 13 VOX AJA button really sends (now DQ-Rack 33-36) from Companion's store; a source no button sends is MIC WRONG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -986,6 +986,39 @@ class TestResiVox(unittest.TestCase):
|
||||
self.assertEqual(self.run_eval("Genesis lead\nRESI TX", 2)[0], ["RESI V2 NOT VOX 4"])
|
||||
self.assertEqual(self.run_eval("Genesis lead\nRESI TX", 2)[2], 4)
|
||||
|
||||
def test_the_buttons_say_where_each_vox_comes_from(self):
|
||||
"""2026-10-27: the VOX AJA buttons now send the DQ-Rack's 33-36; the panel reads what each button sends."""
|
||||
import sqlite3
|
||||
d = tempfile.mkdtemp()
|
||||
self.addCleanup(shutil.rmtree, d)
|
||||
db = os.path.join(d, "db.sqlite")
|
||||
con = sqlite3.connect(db)
|
||||
con.execute("create table pages (id integer, value text)")
|
||||
con.execute("create table controls (id text, value text)")
|
||||
con.execute("insert into pages values (13, ?)", (json.dumps({"controls": {"3": {str(n): "bank:v%d" % n for n in range(1, 5)}}}),))
|
||||
for n in range(1, 5):
|
||||
act = {"definitionId": "makeCrosspointDropDown", "options": {
|
||||
"destinationDevice": {"value": "STUDIO-A-Resi-AJA-SDI"}, "sourceDevice": {"value": "BOH-DQ-Rack"},
|
||||
"sourceChannel_BOH-DQ-Rack": {"value": 32 + n}, "sourceChannel_BOH-AD4Q-A": {"value": n}}}
|
||||
con.execute("insert into controls values (?, ?)", ("bank:v%d" % n, json.dumps({"steps": {"0": {"action_sets": {"down": [act]}}}})))
|
||||
con.commit()
|
||||
con.close()
|
||||
cfg = {"companion": {"db": db}}
|
||||
self.assertEqual(rd.vox_sources(cfg, self.RV), {n: ("BOH-DQ-Rack", 32 + n) for n in range(1, 5)})
|
||||
names = ["%02d DQ-CH" % i for i in range(1, 33)] + ["33 DQ-VOX 1", "34 DQ-VOX 2", "35 DQ-VOX 3", "36 DQ-VOX 4"]
|
||||
got = {"tx_channel": "33 DQ-VOX 1", "tx_device": "BOH-DQ-Rack", "name": "5 - Lead Vocal"}
|
||||
orig = rd.companion_var, rd.dante_rx
|
||||
rd.companion_var = lambda cfg, conn, name: json.dumps(names) if name.endswith("_tx_names") else "169.254.54.105"
|
||||
rd.dante_rx = lambda ip, ch: dict(got)
|
||||
try:
|
||||
self.assertEqual(rd.resi_now(cfg, self.RV)[0], 1)
|
||||
got["tx_channel"] = "36 DQ-VOX 4"
|
||||
self.assertEqual(rd.resi_now(cfg, self.RV)[0], 4)
|
||||
got.update(tx_channel="01-VOX 1", tx_device="BOH-AD4Q-A") # the old source: not a button's now
|
||||
self.assertIsNone(rd.resi_now(cfg, self.RV)[0])
|
||||
finally:
|
||||
rd.companion_var, rd.dante_rx = orig
|
||||
|
||||
def test_no_resi_mark_means_the_last_song_before_the_message(self):
|
||||
self.assertEqual(rd.resi_song(self.plan("Rosaliz lead"))["title"], "Name Above All Names")
|
||||
self.assertEqual(self.run_eval("Rosaliz lead", 2), ([], "VOX 2 ROSALIZ", 2))
|
||||
|
||||
Reference in New Issue
Block a user