mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpimath] Replace Speeds with Velocities (#8479)
I left "free speed" alone since that's the technical term for it. In general, velocity is a vector quantity, and speed is a magnitude (i.e., a strictly positive value). This PR also replaces the speed verbiage in MotorController with duty cycle. Fixes #8423.
This commit is contained in:
@@ -39,7 +39,7 @@ class MyRobot(wpilib.TimedRobot):
|
||||
self.rightDrive.setInverted(True)
|
||||
|
||||
def teleopPeriodic(self) -> None:
|
||||
# The motor speed is set from the joystick while the DifferentialDrive turning value is assigned
|
||||
# The motor velocity is set from the joystick while the DifferentialDrive turning value is assigned
|
||||
# from the error between the setpoint and the gyro angle.
|
||||
turningValue = (
|
||||
self.kAngleSetpoint - self.imu.getRotation2d().degrees()
|
||||
|
||||
Reference in New Issue
Block a user