From ba5af9484b62516c3635bc5261e18832e9ab2ed8 Mon Sep 17 00:00:00 2001 From: Liam Sykes <2491nomythic@gmail.com> Date: Wed, 20 Nov 2024 17:01:12 -0600 Subject: [PATCH] fixed inversion of shooting while moving forward/backward on blue alliance --- src/main/java/frc/robot/subsystems/AngleShooterSubsystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/AngleShooterSubsystem.java b/src/main/java/frc/robot/subsystems/AngleShooterSubsystem.java index 274e4e7..4ee9e64 100644 --- a/src/main/java/frc/robot/subsystems/AngleShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/AngleShooterSubsystem.java @@ -172,7 +172,7 @@ public double calculateSpeakerAngle() { offsetSpeakerX = Field.SHOOTER_RED_SPEAKER_X - targetOffset.getX(); offsetSpeakerY = Field.RED_SPEAKER_Y - targetOffset.getY(); } else { - offsetSpeakerX = Field.SHOOTER_BLUE_SPEAKER_X - targetOffset.getX(); + offsetSpeakerX = Field.SHOOTER_BLUE_SPEAKER_X + targetOffset.getX(); offsetSpeakerY = Field.BLUE_SPEAKER_Y - targetOffset.getY(); } double offsetDeltaX = Math.abs(dtvalues.getX() - offsetSpeakerX);