diff --git a/config.py b/config.py index 19dfd5c9fc36e40612b28355782b40a9fc7710cd..22c74b167f48dc5346f6afd76ab3fca674e250b9 100644 --- a/config.py +++ b/config.py @@ -16,11 +16,11 @@ default_config = { } config = default_config.copy() -if os.path.exists("config.json"): - with open("config.json", "r") as f: +if os.path.exists("hw_config.json"): + with open("hw_config.json", "r") as f: config.update(json.load(f)) -with open("config.json", "w") as f: +with open("hw_config.json", "w") as f: json.dump(config, f, indent=4) PROP_SCREEN_WIDTH = config["screen_width"] diff --git a/main.py b/main.py index f755a29fa3d64192f086ffb6a45d2884dbf8c6d6..6b021ad060fe12053f7b2d5d08b18aa39a3da437 100644 --- a/main.py +++ b/main.py @@ -91,6 +91,10 @@ def wr_set_pattern(): def wr_get_config(): return Response(json.dumps(module_config), mimetype="application/json") +@app.route("/api/test") +def wr_test(): + print(request.json) + def load_widget(widget_name: str): # Get the widget properties from the config file widget_props = module_config.get(widget_name, {}).copy() @@ -114,6 +118,7 @@ def run_screen(): # Initialise Pygame and create a window pygame.init() pg_options = 0x0 + print(PROP_WINDOW_FULLSCREEN) if PROP_WINDOW_FULLSCREEN: pg_options |= pygame.FULLSCREEN screen = pygame.display.set_mode(