Merge /sd/launch.conf.json with root file

This commit is contained in:
Cooper Dalrymple 2025-08-26 09:54:28 -05:00
parent 508a0f5b87
commit e49c2fdbb5
2 changed files with 9 additions and 7 deletions

View file

@ -16,9 +16,10 @@ import audiobusio
import adafruit_pathlib as pathlib
launcher_config = {}
if pathlib.Path("launcher.conf.json").exists():
with open("launcher.conf.json", "r") as f:
launcher_config = json.load(f)
for launcher_config_path in ("launcher.conf.json", "/sd/launcher.conf.json"):
if pathlib.Path(launcher_config_path).exists():
with open(launcher_config_path, "r") as f:
launcher_config = launcher_config | json.load(f)
BOX_SIZE = (235, 107)
TARGET_FPS = 70
@ -701,4 +702,4 @@ if ltv320_present:
pass
supervisor.set_next_code_file("code.py")
supervisor.reload()
supervisor.reload()

View file

@ -69,9 +69,10 @@ if display.width > 360:
scale = 2
launcher_config = {}
if pathlib.Path("launcher.conf.json").exists():
with open("launcher.conf.json", "r") as f:
launcher_config = json.load(f)
for launcher_config_path in ("launcher.conf.json", "/sd/launcher.conf.json"):
if pathlib.Path(launcher_config_path).exists():
with open(launcher_config_path, "r") as f:
launcher_config = launcher_config | json.load(f)
if "palette" not in launcher_config:
launcher_config["palette"] = {}