Removed the PID settings
This commit is contained in:
1 parent
0e29865bd2
commit
b6bcb51b36
1 file changed
-14
@@ -12,14 +12,6 @@
|
|||||||
# Port D: Drive motor #
|
# Port D: Drive motor #
|
||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
# #
|
|
||||||
# Changelog #
|
|
||||||
# #
|
|
||||||
################################################################################
|
|
||||||
# v0.0.0 21-08-2022 #
|
|
||||||
# First version. #
|
|
||||||
# Based on v0.1.0 05-07-2022 of 42124-1 - Off-Road Buggy #
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
from pybricks.pupdevices import Motor, Remote
|
from pybricks.pupdevices import Motor, Remote
|
||||||
from pybricks.parameters import Port, Direction, Stop, Button, Color
|
from pybricks.parameters import Port, Direction, Stop, Button, Color
|
||||||
@@ -38,12 +30,6 @@ remote = Remote()
|
|||||||
# Initialize the hub.
|
# Initialize the hub.
|
||||||
hub = TechnicHub()
|
hub = TechnicHub()
|
||||||
|
|
||||||
# Read the current settings
|
|
||||||
old_kp, old_ki, old_kd, _, _ = steering.control.pid()
|
|
||||||
|
|
||||||
# Set new values
|
|
||||||
steering.control.pid(kp=old_kp*4, kd=old_kd*0.4)
|
|
||||||
|
|
||||||
# Find the steering endpoint on the left and right.
|
# Find the steering endpoint on the left and right.
|
||||||
# The middle is in between.
|
# The middle is in between.
|
||||||
left_end = steering.run_until_stalled(-200, then=Stop.HOLD)
|
left_end = steering.run_until_stalled(-200, then=Stop.HOLD)
|
||||||
|
|||||||
Reference in new issue
Block a user