From dbbeecc7b92f5b14d5a103f55a9c2e929d45397d Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 2 Mar 2020 23:45:07 -0700 Subject: [PATCH] fix motor stop at controller stop --- Software/python/hwtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Software/python/hwtest.py b/Software/python/hwtest.py index e407c4d..c356426 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -148,6 +148,9 @@ def controller(): # TODO: replace sleep statement with something that doesn't depend on execution time of loop time.sleep(sample_interval) + for ii in range(3): + servos[ii].throttle = 0 + print("INFO: Controller stopped") control_thread = None @@ -194,7 +197,6 @@ def stop_controller(attrname=None, old=None, new=None): control_thread = None except: pass - servos[ii].throttle = 0 # GUI elements cal_white_button = Button(label="Cal White")