mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-27 03:17:06 -07:00
fix name mismatch
This commit is contained in:
parent
e66e7f1bd0
commit
36e538cfbd
|
@ -87,7 +87,7 @@ def controller():
|
||||||
global brightness
|
global brightness
|
||||||
global time_data
|
global time_data
|
||||||
global servos
|
global servos
|
||||||
global controller_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
|
||||||
|
@ -103,7 +103,7 @@ def controller():
|
||||||
new_c = 0
|
new_c = 0
|
||||||
motor_speed = np.array(motor_directions) * base_speed
|
motor_speed = np.array(motor_directions) * base_speed
|
||||||
|
|
||||||
while controller_thread_run:
|
while control_thread_run:
|
||||||
# Read error
|
# Read error
|
||||||
brightness = np.clip([get_normalized_reflectivity(c) for c in range(8)], 0, 1)
|
brightness = np.clip([get_normalized_reflectivity(c) for c in range(8)], 0, 1)
|
||||||
line_position = np.sum((1 - brightness) * (np.arange(8) - 3.5)) / np.sum(1-brightness) / 3.5
|
line_position = np.sum((1 - brightness) * (np.arange(8) - 3.5)) / np.sum(1-brightness) / 3.5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user