diff --git a/src/main/java/com/cyberknights4911/robot2024/Robot2024.java b/src/main/java/com/cyberknights4911/robot2024/Robot2024.java index f66965c..3570c41 100644 --- a/src/main/java/com/cyberknights4911/robot2024/Robot2024.java +++ b/src/main/java/com/cyberknights4911/robot2024/Robot2024.java @@ -30,6 +30,7 @@ import com.cyberknights4911.robot2024.shooter.Shooter; import com.cyberknights4911.robot2024.shooter.ShooterIO; import com.cyberknights4911.robot2024.shooter.ShooterIOSim; +import com.cyberknights4911.util.Alliance; import com.cyberknights4911.util.GameAlerts; import com.cyberknights4911.util.SparkBurnManager; import edu.wpi.first.math.geometry.Pose2d; @@ -66,6 +67,15 @@ public Robot2024() { } private void configureControls() { + double x; + double y; + if (Alliance.isRed()) { + x = 652.73; + y = 218.42; + } else { + x = -1.50; + y = 218.42; + } drive.setDefaultCommand( drive.joystickDrive( Robot2024Constants.CONTROL_CONSTANTS, @@ -106,8 +116,8 @@ private void configureControls() { Robot2024Constants.CONTROL_CONSTANTS, binding.supplierFor(StickAction.FORWARD), binding.supplierFor(StickAction.STRAFE), - Units.inchesToMeters(652.73), - Units.inchesToMeters(218.42))); + Units.inchesToMeters(x), + Units.inchesToMeters(y))); binding.triggersFor(ButtonAction.StowShooter).onTrue(Commands.none());