"Location", never "campus", in everything people read; SC FOH joined with its MIDI links
- pages (NA 98 Locations / 99 Location, re-imported via PAGES_VERSION), keys, settings page, setup and install messages, alerts, docs, the Apollo Beach kit; python3 -m settings.location and /location/... addresses (the old names still answer for installed Macs) - Apply reads the before settings from the file: an in-place edit skipped the watchdog restart - SC: SUPERRACK (+SoundGrid) and X32 EDIT from SC FOH; FOH TRACKS and TRACKS LIGHTS MIDI links watched Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-10
@@ -1,10 +1,10 @@
|
||||
"""Auto-setup: what a campus has (settings/discover.py's inventory) becomes its keys, checks, fixes
|
||||
"""Auto-setup: what a location has (settings/discover.py's inventory) becomes its keys, checks, fixes
|
||||
and page layout - the same building blocks North Attleboro's were made of by hand.
|
||||
|
||||
Pure functions, no I/O:
|
||||
|
||||
build(base, inv, campus, pin) a whole config for a new campus, from the empty template
|
||||
extend(cfg, inv, seen) a running campus: only what is new (never removes anything)
|
||||
build(base, inv, location, pin) a whole config for a new location, from the empty template
|
||||
extend(cfg, inv, seen) a running location: only what is new (never removes anything)
|
||||
|
||||
Everything that comes out passes schema.validate and can be changed on the settings page like any
|
||||
hand-made setting. Gear auto-setup does not know (a generic connection, an app it has no recipe
|
||||
@@ -20,7 +20,7 @@ import status_panel as sp
|
||||
|
||||
# --- what auto-setup knows -------------------------------------------------------------
|
||||
|
||||
# Group keys sum up their members on a big campus, in this order along the top row.
|
||||
# Group keys sum up their members on a big location, in this order along the top row.
|
||||
GROUPS = ["REC", "AUDIO", "RF", "SHOW", "VIDEO", "STREAM"]
|
||||
# Who gets a cell of its own when not everything fits (the rest show inside their group key only):
|
||||
# a row of wireless receivers folds first, as at North Attleboro.
|
||||
@@ -86,7 +86,7 @@ SHARED_FIXES = {
|
||||
}
|
||||
|
||||
STATUS_ROWS, COLS = 4, 8
|
||||
# North Attleboro's auto-fix hours, for every campus: Tuesday and Wednesday rehearsals, Sunday services.
|
||||
# North Attleboro's auto-fix hours, for every location: Tuesday and Wednesday rehearsals, Sunday services.
|
||||
DEFAULT_AUTO_FIX = {"after_seconds": 20, "max_tries": 2, "retry_seconds": 90, "pause_after_network_seconds": 60,
|
||||
"restart_connections": True, "windows": [{"days": ["tue"], "start": "14:00", "end": "22:00"},
|
||||
{"days": ["wed"], "start": "09:00", "end": "21:00"},
|
||||
@@ -408,7 +408,7 @@ def layout(cfg, new_tiles, restart_items):
|
||||
|
||||
|
||||
def place_new(cfg, tile):
|
||||
"""One more key on a running campus: the first free cell, else inside its group, else on ALL only."""
|
||||
"""One more key on a running location: the first free cell, else inside its group, else on ALL only."""
|
||||
taken = {tuple(t["pos"]) for t in cfg["tiles"] if t.get("pos")}
|
||||
if cfg.get("restart_page"):
|
||||
taken.add(tuple(cfg["restart_page"]["jump_pos"]))
|
||||
@@ -423,7 +423,7 @@ def place_new(cfg, tile):
|
||||
|
||||
|
||||
def restart_layout(cfg, restart_items):
|
||||
"""The Restart page always exists (a campus set up before its computers joined gets their keys later)."""
|
||||
"""The Restart page always exists (a location set up before its computers joined gets their keys later)."""
|
||||
rp = cfg.get("restart_page")
|
||||
if not rp:
|
||||
return
|
||||
@@ -446,7 +446,7 @@ def nets_of(inv):
|
||||
|
||||
|
||||
def build(base, inv, campus, pin, pages=(19, 20)):
|
||||
"""A whole config for a new campus: the template, this Mac, and a key for everything found."""
|
||||
"""A whole config for a new location: the template, this Mac, and a key for everything found."""
|
||||
cfg = copy.deepcopy(base)
|
||||
ing = inv.get("ingest") or {}
|
||||
wired = ing.get("wired") or {}
|
||||
@@ -485,7 +485,7 @@ def build(base, inv, campus, pin, pages=(19, 20)):
|
||||
|
||||
|
||||
def extend(cfg, inv, seen):
|
||||
"""What is new since the last look, added to a running campus. Never removes or changes what is
|
||||
"""What is new since the last look, added to a running location. Never removes or changes what is
|
||||
there; a thing seen before (and so deliberately taken off by someone) is not added again.
|
||||
Returns (new config, [what was added, in words], [identities now seen])."""
|
||||
cfg = copy.deepcopy(cfg)
|
||||
@@ -570,7 +570,7 @@ def keep_from(new, old):
|
||||
cfg = copy.deepcopy(new)
|
||||
have = referenced(cfg)
|
||||
kept = []
|
||||
# Switch keys made for this campus by hand (Southcoast's LIGHTS) and an AUTO-FIX key: auto-setup makes neither.
|
||||
# Switch keys made for this location by hand (Southcoast's LIGHTS) and an AUTO-FIX key: auto-setup makes neither.
|
||||
for t in old.get("tiles", []):
|
||||
if t.get("kind") not in ("bypass", "autofix") or t["id"] in {x["id"] for x in cfg["tiles"]}:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user