Skip to content

Commit

Permalink
Merge branch 'main' into lance/pivot
Browse files Browse the repository at this point in the history
  • Loading branch information
JetBluefan1 authored Dec 6, 2024
2 parents 254187a + 024602c commit 4c1d729
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ public class RobotContainer {
() -> MathUtil.applyDeadband(driverXbox.getLeftX(), OperatorConstants.LEFT_X_DEADBAND),
() -> driverXbox.getRawAxis(2));

Command driveFieldOrientedAnglularVelocityPrecision =
drivebase.driveCommand(
() ->
MathUtil.applyDeadband(
-driverXbox.getLeftY() * 0.5, OperatorConstants.LEFT_Y_DEADBAND),
() ->
MathUtil.applyDeadband(
-driverXbox.getLeftX() * 0.5, OperatorConstants.LEFT_X_DEADBAND),
() -> driverXbox.getRightX() * -1 * 0.5);

/** The container for the robot. Contains subsystems, OI devices, and commands. */
public RobotContainer() {
NamedCommands.registerCommand("Pivot Up", pivot.pivotUp());
Expand Down Expand Up @@ -86,14 +96,9 @@ private void configureBindings() {
driverXbox.start().onTrue(Commands.runOnce(drivebase::zeroGyro));
driverXbox.back().whileTrue(Commands.none());
driverXbox.leftBumper().whileTrue(Commands.none());
driverXbox
.leftTrigger()
.whileTrue(
intake.intakeBucket());
driverXbox
.rightTrigger()
.whileTrue(intake.outtakeBucket());
driverXbox.rightBumper().onTrue(Commands.none());
driverXbox.leftTrigger().whileTrue(intake.intakeBucket());
driverXbox.rightTrigger().whileTrue(intake.outtakeBucket());
driverXbox.rightBumper().whileTrue(driveFieldOrientedAnglularVelocityPrecision);
drivebase.setDefaultCommand(
!RobotBase.isSimulation()
? driveFieldOrientedAnglularVelocity
Expand Down

0 comments on commit 4c1d729

Please sign in to comment.