mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-26 07:01:39 +00:00
Updated docs and swervelib
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user