From fac64fc9e99de2cd37887ffd8e9089779bd3a58c Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 7 Jul 2021 08:35:45 +0200 Subject: [PATCH] Move main --- amp_controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/amp_controller.py b/amp_controller.py index 305d5f3..28a7d7f 100644 --- a/amp_controller.py +++ b/amp_controller.py @@ -80,7 +80,7 @@ class amp_controller: return False -if __name__ == "__main__": +def main(): ac = amp_controller() ac.setup_pins() ac.power("on") @@ -131,3 +131,7 @@ if __name__ == "__main__": timer = ac.SHUTOFF_TIMER_DURATION logging.debug("Something is playing.") logging.debug("Timer: " + str(timer)) + + +if __name__ == "__main__": + main()