mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-11-09 21:14:47 -07:00
fix motor stop at controller stop
This commit is contained in:
parent
6bec9830b8
commit
dbbeecc7b9
|
@ -148,6 +148,9 @@ def controller():
|
||||||
# TODO: replace sleep statement with something that doesn't depend on execution time of loop
|
# TODO: replace sleep statement with something that doesn't depend on execution time of loop
|
||||||
time.sleep(sample_interval)
|
time.sleep(sample_interval)
|
||||||
|
|
||||||
|
for ii in range(3):
|
||||||
|
servos[ii].throttle = 0
|
||||||
|
|
||||||
print("INFO: Controller stopped")
|
print("INFO: Controller stopped")
|
||||||
|
|
||||||
control_thread = None
|
control_thread = None
|
||||||
|
@ -194,7 +197,6 @@ def stop_controller(attrname=None, old=None, new=None):
|
||||||
control_thread = None
|
control_thread = None
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
servos[ii].throttle = 0
|
|
||||||
|
|
||||||
# GUI elements
|
# GUI elements
|
||||||
cal_white_button = Button(label="Cal White")
|
cal_white_button = Button(label="Cal White")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user