From e49c2fdbb5c6688aa80008a74bc53ce6f870d411 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Tue, 26 Aug 2025 09:54:28 -0500 Subject: [PATCH] Merge `/sd/launch.conf.json` with root file --- src/boot_animation.py | 9 +++++---- src/code.py | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/boot_animation.py b/src/boot_animation.py index d59cc90..c57c691 100644 --- a/src/boot_animation.py +++ b/src/boot_animation.py @@ -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() \ No newline at end of file +supervisor.reload() diff --git a/src/code.py b/src/code.py index 0ef5171..54981ab 100644 --- a/src/code.py +++ b/src/code.py @@ -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"] = {}