mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-27 03:17:06 -07:00
clip motor values
This commit is contained in:
parent
0a7e1cd9df
commit
889ce361ba
|
@ -135,6 +135,7 @@ def controller():
|
||||||
# Calculate output
|
# Calculate output
|
||||||
new_c += fir_taps[0] * line_position
|
new_c += fir_taps[0] * line_position
|
||||||
motor_speed += steering_sign * new_c
|
motor_speed += steering_sign * new_c
|
||||||
|
np.clip(motor_speed, -1, 1)
|
||||||
|
|
||||||
# Update motors
|
# Update motors
|
||||||
for ii in range(3):
|
for ii in range(3):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user