From 8c34681aa46f92935faed410cd39c920aeef02db Mon Sep 17 00:00:00 2001 From: Quentin Bolsee <quentinbolsee@hotmail.com> Date: Thu, 14 Dec 2023 16:07:07 -0500 Subject: [PATCH] main code --- host/config.json | 1 + host/main.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/host/config.json b/host/config.json index bd635ae..3e45bc1 100644 --- a/host/config.json +++ b/host/config.json @@ -1,4 +1,5 @@ { + "use_machine": false, "rotate": false, "fullscreen": false, "overlays": { diff --git a/host/main.py b/host/main.py index f408f2a..b9cbdea 100644 --- a/host/main.py +++ b/host/main.py @@ -170,11 +170,12 @@ def main(): with open("config.json", "r") as f: config = json.load(f) - m = machine.Machine(config["ports"]) - m.pen_action(2, False) - m.home() app = MainApplication(fullscreen=config["fullscreen"], rotate=config["rotate"]) - app.machine = m + if config["use_machine"]: + m = machine.Machine(config["ports"]) + m.pen_action(2, False) + m.home() + app.machine = m app.load_overlays(config["overlays"]) app.run() app.video.release() @@ -183,4 +184,3 @@ def main(): if __name__ == "__main__": main() -+ \ No newline at end of file -- GitLab