From 79e17593af2f245f3853ff3ebfc1f7832b7be6b8 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 2 Mar 2024 22:16:00 -0800 Subject: [PATCH] Fixed feed forward --- src/main/java/org/carlmontrobotics/subsystems/Arm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/carlmontrobotics/subsystems/Arm.java b/src/main/java/org/carlmontrobotics/subsystems/Arm.java index 6eae7657..5d2c7b8b 100644 --- a/src/main/java/org/carlmontrobotics/subsystems/Arm.java +++ b/src/main/java/org/carlmontrobotics/subsystems/Arm.java @@ -157,7 +157,7 @@ public void autoCancelArmCommand() { public void driveArm(double goalAngle){ TrapezoidProfile.State goalState = new TrapezoidProfile.State(goalAngle, 0); TrapezoidProfile.State setPoint = armProfile.calculate(kDt, getCurrentArmState(), goalState); - double armFeedVolts = armFeed.calculate(goalState.velocity, 0); + double armFeedVolts = armFeed.calculate(goalState.velocity, 0, .02); armPID1.setReference(setPoint.position, CANSparkBase.ControlType.kVelocity, 0, armFeedVolts); }