Updated docs and swervelib

This commit is contained in:
thenetworkgrinch
2023-02-23 21:12:29 -06:00
parent b1781a2238
commit f5c63d5c6f
108 changed files with 279 additions and 299 deletions

View File

@@ -92,8 +92,7 @@ public class SwerveController
}
/**
* Get the chassis speeds based on controller input of 1 joystick and an angle. Cubes the x and y input for smoother
* motion.
* Get the chassis speeds based on controller input of 1 joystick [-1,1] and an angle.
*
* @param xInput X joystick input for the robot to move in the X direction.
* @param yInput Y joystick input for the robot to move in the Y direction.
@@ -106,8 +105,8 @@ public class SwerveController
{
// Convert joystick inputs to m/s by scaling by max linear speed. Also uses a cubic function
// to allow for precise control and fast movement.
double x = Math.pow(xInput, 3) * config.maxSpeed;
double y = Math.pow(yInput, 3) * config.maxSpeed;
double x = xInput * config.maxSpeed;
double y = yInput * config.maxSpeed;
return getRawTargetSpeeds(x, y, angle, currentHeadingAngleRadians);
}