From 39c6949500b799a4081e94d37461b1c508281937 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Mon, 13 Feb 2023 19:50:58 -0700 Subject: [PATCH] cubic curve --- src/main/java/frc4388/robot/subsystems/SwerveDrive.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/frc4388/robot/subsystems/SwerveDrive.java b/src/main/java/frc4388/robot/subsystems/SwerveDrive.java index 17bdd5b..4d9faa0 100644 --- a/src/main/java/frc4388/robot/subsystems/SwerveDrive.java +++ b/src/main/java/frc4388/robot/subsystems/SwerveDrive.java @@ -78,6 +78,7 @@ public class SwerveDrive extends SubsystemBase { // Use the left joystick to set speed. Apply a quadratic curve and the set max speed. Translation2d speed = leftStick.times(leftStick.getNorm() * speedAdjust); + speed = new Translation2d(Math.pow(speed.getX(), 3), Math.pow(speed.getY(), 3)); // if (rightStick.getNorm() < .1) { // rot = 0;