Group scripts into pad/, shows/ and anim/ folders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f593b973c
commit
647cfa3a75
26 files changed
+68
-66
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Set the SMC-PAD lamps: bank 1 off, bank 2 in the colours of shows/test.qxw.
|
||||
|
||||
.venv/bin/python scripts/pad/pad_lamps.py
|
||||
|
||||
Needs the USB Private port. smooth_smc_pad.py does this on start; run this
|
||||
when the pad is read by Chataigne instead.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def set_lamps() -> None:
|
||||
"""Bank 1 lamps off, bank 2 lamps from shows/test.qxw. Needs the USB Private port."""
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / "scripts" / "pad"))
|
||||
import pad_colours
|
||||
|
||||
try:
|
||||
pad_colours.apply(True, bank=1)
|
||||
pad_colours.apply(False, bank=2, colours=pad_colours.colour_set())
|
||||
except (SystemExit, Exception) as exc: # the Bluetooth link has no Private port
|
||||
print(f"Lamps not set: {exc}", flush=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
set_lamps()
|
||||
Reference in new issue
Block a user