Merge branch 'testRoboReveal' of https://github.com/Team4388/2022NoWayHome into testRoboReveal

This commit is contained in:
aarav18
2022-03-20 01:43:04 -06:00
+16 -10
View File
@@ -178,13 +178,21 @@ public class RobotContainer {
// Swerve Drive with Input // Swerve Drive with Input
m_robotSwerveDrive.setDefaultCommand( m_robotSwerveDrive.setDefaultCommand(
new RunCommand(() -> m_robotSwerveDrive.driveWithInput( new RunCommand(() -> {
getDriverController().getLeftX(), if (this.currentControlMode.equals(ControlMode.SHOOTER)) {
getDriverController().getLeftY(), m_robotSwerveDrive.driveWithInput( getDriverController().getLeftX(),
getDriverController().getRightX(), getDriverController().getLeftY(),
getDriverController().getRightY(), getDriverController().getRightX(),
true), getDriverController().getRightY(),
m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand")); true); }
if (this.currentControlMode.equals(ControlMode.CLIMBER)) {
m_robotSwerveDrive.driveWithInput( 0,
0,
0,
0,
true);
}}
, m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand"));
// Intake with Triggers // Intake with Triggers
m_robotIntake.setDefaultCommand( m_robotIntake.setDefaultCommand(
@@ -215,9 +223,7 @@ public class RobotContainer {
m_robotTurret.setDefaultCommand( m_robotTurret.setDefaultCommand(
new RunCommand(() -> { new RunCommand(() -> {
if (this.currentControlMode.equals(ControlMode.SHOOTER)) { if (this.currentControlMode.equals(ControlMode.SHOOTER)) { m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()); }
if (this.currentTurretMode.equals(TurretMode.MANUAL)) { m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()); }
}
if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotTurret.runTurretWithInput(0); } if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotTurret.runTurretWithInput(0); }
}, m_robotTurret)); }, m_robotTurret));