mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-27 03:17:06 -07:00
make the controller a little more interesting
This commit is contained in:
parent
ce127c9ab0
commit
cb7904af3a
|
@ -117,7 +117,7 @@ def control_thread():
|
||||||
|
|
||||||
sample_interval = 0.01
|
sample_interval = 0.01
|
||||||
base_speed = 0.1
|
base_speed = 0.1
|
||||||
fir_taps = [1, 0, 0]
|
fir_taps = [1, 1, 0]
|
||||||
iir_taps = [0, 0]
|
iir_taps = [0, 0]
|
||||||
time_data = np.zeros((max(len(fir_taps), len(iir_taps)), time_data.shape[1]))
|
time_data = np.zeros((max(len(fir_taps), len(iir_taps)), time_data.shape[1]))
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ def control_thread():
|
||||||
line_position = 0
|
line_position = 0
|
||||||
|
|
||||||
# Calculate output
|
# Calculate output
|
||||||
new_c += fir_taps[0] * line_position
|
new_c += fir_taps[0] * error
|
||||||
motor_speed += new_c
|
motor_speed += new_c
|
||||||
|
|
||||||
# Update motors
|
# Update motors
|
||||||
|
|
Loading…
Reference in New Issue
Block a user