mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-26 10:57:55 -07:00
add info messages when controller starts/stops
This commit is contained in:
parent
753d7473b1
commit
403842cd58
|
@ -95,6 +95,7 @@ def controller():
|
||||||
global servos
|
global servos
|
||||||
global control_thread_run
|
global control_thread_run
|
||||||
|
|
||||||
|
|
||||||
# TODO: make these parameters editable via network interface
|
# TODO: make these parameters editable via network interface
|
||||||
sample_interval = 0.01
|
sample_interval = 0.01
|
||||||
base_speed = 0.1
|
base_speed = 0.1
|
||||||
|
@ -104,6 +105,8 @@ def controller():
|
||||||
motor_directions = [-1, 1, 0]
|
motor_directions = [-1, 1, 0]
|
||||||
steering_sign = 1
|
steering_sign = 1
|
||||||
|
|
||||||
|
print("INFO: Controller started")
|
||||||
|
|
||||||
# Precompute
|
# Precompute
|
||||||
this_time = 0
|
this_time = 0
|
||||||
new_c = 0
|
new_c = 0
|
||||||
|
@ -144,6 +147,8 @@ 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)
|
||||||
|
|
||||||
|
print("INFO: Controller stopped")
|
||||||
|
|
||||||
control_thread = None
|
control_thread = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user