From 61c0018a03b979f9af9b4836ac3bfc135d299a7d Mon Sep 17 00:00:00 2001 From: mixxlto Date: Sun, 1 Feb 2026 11:55:10 -0800 Subject: [PATCH] nvm --- .../frc/robot/subsystems/turret/Turret.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/turret/Turret.java b/src/main/java/frc/robot/subsystems/turret/Turret.java index 10490fe..feafc35 100644 --- a/src/main/java/frc/robot/subsystems/turret/Turret.java +++ b/src/main/java/frc/robot/subsystems/turret/Turret.java @@ -189,17 +189,17 @@ public class Turret extends SubsystemBase { double targetVelocity; - if(Math.abs(setpoint.position * GEAR_RATIO - Units.rotationsToRadians(motor.getPosition().getValueAsDouble())) > Math.PI/2){ - // in rad/sec - targetVelocity = longVelocityPID.calculate( - motor.getPosition().getValue().in(edu.wpi.first.units.Units.Radians), - setpoint.position * GEAR_RATIO); + // if(Math.abs(setpoint.position * GEAR_RATIO - Units.rotationsToRadians(motor.getPosition().getValueAsDouble())) > Math.PI/2){ + // // in rad/sec + // targetVelocity = longVelocityPID.calculate( + // motor.getPosition().getValue().in(edu.wpi.first.units.Units.Radians), + // setpoint.position * GEAR_RATIO); - targetVelocity += Units.rotationsToRadians(motorVelRotPerSec); + // targetVelocity += Units.rotationsToRadians(motorVelRotPerSec); - double voltage = feedForward.calculate(targetVelocity); - motor.setVoltage(voltage); - } else{ + // double voltage = feedForward.calculate(targetVelocity); + // motor.setVoltage(voltage); + // } else{ // in rad/sec targetVelocity = velocityPID.calculate( motor.getPosition().getValue().in(edu.wpi.first.units.Units.Radians), @@ -209,7 +209,7 @@ public class Turret extends SubsystemBase { double voltage = feedForward.calculate(targetVelocity); motor.setVoltage(voltage); - } + // } lastFrameVelocity = targetVelocity; -- 2.39.5