Skip to content

Commit

Permalink
Merge branch 'main' into indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Krylez committed Mar 2, 2024
2 parents 9c8898d + d338c73 commit a44df9c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main/java/com/cyberknights4911/robot2024/Robot2024.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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());

Expand Down

0 comments on commit a44df9c

Please sign in to comment.