This commit is contained in:
Ryan
2022-03-22 17:36:29 -06:00
parent 22e21be7b0
commit 1193a3ecef
@@ -97,22 +97,22 @@ public class TrackTarget extends CommandBase {
output *= 2.0; output *= 2.0;
m_turret.runTurretWithInput(output); m_turret.runTurretWithInput(output);
double position = m_turret.m_boomBoomRotateEncoder.getPosition(); // double position = m_turret.m_boomBoomRotateEncoder.getPosition();
if(Math.abs(position - ShooterConstants.TURRET_FORWARD_SOFT_LIMIT) < 5 || // if(Math.abs(position - ShooterConstants.TURRET_FORWARD_SOFT_LIMIT) < 5 ||
Math.abs(position - ShooterConstants.TURRET_REVERSE_SOFT_LIMIT) < 5) // Math.abs(position - ShooterConstants.TURRET_REVERSE_SOFT_LIMIT) < 5)
m_swerve.driveWithInput(RobotContainer.getDriverController().getLeftX(), RobotContainer.getDriverController().getLeftY(), output, true); // m_swerve.driveWithInput(RobotContainer.getDriverController().getLeftX(), RobotContainer.getDriverController().getLeftY(), output, true);
else // else
m_swerve.driveWithInput(RobotContainer.getDriverController().getLeftX(), RobotContainer.getDriverController().getLeftY(), // m_swerve.driveWithInput(RobotContainer.getDriverController().getLeftX(), RobotContainer.getDriverController().getLeftY(),
RobotContainer.getDriverController().getRightX(), RobotContainer.getDriverController().getRightY(), // RobotContainer.getDriverController().getRightX(), RobotContainer.getDriverController().getRightY(),
true); // true);
double regressedDistance = getDistance(average.y); double regressedDistance = getDistance(average.y);
// ! no longer a +30 lol -aarav // ! no longer a +30 lol -aarav
velocity = m_boomBoom.getVelocity(regressedDistance + 30); velocity = m_boomBoom.getVelocity(regressedDistance);
hoodPosition = m_boomBoom.getHood(regressedDistance + 30); hoodPosition = m_boomBoom.getHood(regressedDistance);
m_boomBoom.runDrumShooterVelocityPID(velocity); m_boomBoom.runDrumShooterVelocityPID(velocity);
m_hood.runAngleAdjustPID(hoodPosition); m_hood.runAngleAdjustPID(hoodPosition);