DummySensor class, shoot is tested

This commit is contained in:
aarav18
2022-03-05 11:07:54 -07:00
parent 71e082e7bd
commit f895352bb9
10 changed files with 185 additions and 119 deletions
+12 -12
View File
@@ -58,6 +58,7 @@ import frc4388.robot.Constants.LEDConstants;
import frc4388.robot.Constants.OIConstants;
import frc4388.robot.Constants.SwerveDriveConstants;
import frc4388.robot.commands.AimToCenter;
import frc4388.robot.commands.Shoot;
import frc4388.robot.subsystems.BoomBoom;
import frc4388.robot.subsystems.Hood;
import frc4388.robot.subsystems.LED;
@@ -88,12 +89,12 @@ public class RobotContainer {
private final LED m_robotLED = new LED(m_robotMap.LEDController);
private final BoomBoom m_robotBoomBoom = new BoomBoom(m_robotMap.shooterFalconLeft, m_robotMap.shooterFalconRight);
private final Hood m_robotHood = new Hood();
// private final Turret m_robotTurret = new Turret(m_robotMap.shooterTurret);
// private final Vision m_robotVison = new Vision(m_robotTurret, m_robotBoomBoom);
private final Turret m_robotTurret = new Turret(m_robotMap.shooterTurret);
private final Vision m_robotVision = new Vision(m_robotTurret, m_robotBoomBoom);
/* Controllers */
private final XboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID);
private final XboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID);
/* Autonomous */
private PathPlannerTrajectory loadedPathTrajectory = null;
private final ListeningSendableChooser<File> autoChooser = new ListeningSendableChooser<>(this::loadPath);
@@ -119,7 +120,7 @@ public class RobotContainer {
//Turret default command
// m_robotTurret.setDefaultCommand(new AimToCenter(m_robotTurret, m_robotSwerveDrive));
m_robotTurret.setDefaultCommand(new AimToCenter(m_robotTurret, m_robotSwerveDrive));
m_robotSwerveDrive.setDefaultCommand(
new RunCommand(() -> m_robotSwerveDrive.driveWithInput(
@@ -161,17 +162,16 @@ public class RobotContainer {
/* Operator Buttons */
// activates "Lit Mode"
new JoystickButton(getOperatorController(), XboxController.Button.kA.value)
new JoystickButton(getOperatorController(), XboxController.Button.kB.value)
.whenPressed(() -> m_robotLED.setPattern(LEDPatterns.LAVA_RAINBOW))
.whenReleased(() -> m_robotLED.setPattern(LEDConstants.DEFAULT_PATTERN));
new JoystickButton(getOperatorController(), XboxController.Button.kY.value)
.whenPressed(new InstantCommand());
// activates "BoomBoom"
new JoystickButton(getOperatorController(), XboxController.Button.kB.value)
.whenPressed(() -> m_robotBoomBoom.runDrumShooterVelocityPID(0.1))
.whenReleased(() -> m_robotBoomBoom.runDrumShooterVelocityPID(0));
// activates hood
new JoystickButton(getOperatorController(), XboxController.Button.kB.value)
.whenPressed(() -> m_robotHood.runHood(0.5d))
.whenReleased(() -> m_robotHood.runHood(0.d));
new JoystickButton(getOperatorController(), XboxController.Button.kA.value)
.whenPressed(new Shoot(m_robotSwerveDrive, m_robotBoomBoom, m_robotTurret, m_robotHood));
}
/**