diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index a4a205d..8d08204 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -90,13 +90,13 @@ public final class Constants { public static final int HOOD_SERVO_CHANNEL = 0; public static final boolean HOOD_SERVO_INVERTED = true; // TODO: Test this public static final int HOOD_ENCODER_ID = 0; - public static final Angle TARGET_ELEVATION_DIF = edu.wpi.first.units.Units.Degrees.of(10000); - public static final Angle LIMIT_ELEVATION_POS = edu.wpi.first.units.Units.Degrees.of(0); + public static final Angle TARGET_ELEVATION_DIF = edu.wpi.first.units.Units.Degrees.of(.5); + public static final Angle LIMIT_ELEVATION_POS = edu.wpi.first.units.Units.Degrees.of(90); public static final Angle LIMIT_ELEVATION_NEG = edu.wpi.first.units.Units.Degrees.of(0); public static final Angle DEFLECTOR_STORED_ANGLE = edu.wpi.first.units.Units.Degrees.of(0); - public static final Angle DEFLECTOR_SET_ANGLE1 = edu.wpi.first.units.Units.Degrees.of(0); - public static final Angle DEFLECTOR_SET_ANGLE2 = edu.wpi.first.units.Units.Degrees.of(0); - public static final Angle DEFLECTOR_SET_ANGLE3 = edu.wpi.first.units.Units.Degrees.of(0); + public static final Angle DEFLECTOR_SET_ANGLE1 = edu.wpi.first.units.Units.Degrees.of(20); + public static final Angle DEFLECTOR_SET_ANGLE2 = edu.wpi.first.units.Units.Degrees.of(40); + public static final Angle DEFLECTOR_SET_ANGLE3 = edu.wpi.first.units.Units.Degrees.of(60); } public static class HopperConstants { diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 5705810..cf42547 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -66,14 +66,12 @@ public class RobotContainer { turretSubsystem.setDefaultCommand(new ManualShootCommand(turretSubsystem, m_driverController.getHID())); hopperSubsystem.setDefaultCommand(new ManualHopperCommand(hopperSubsystem, m_driverController.getHID())); - //The shooter will tear its self apart if deflector moves, so dont move it - - /*m_driverController.povDown().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_STORED_ANGLE)); + m_driverController.povDown().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_STORED_ANGLE)); m_driverController.povLeft().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_SET_ANGLE1)); m_driverController.povRight().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_SET_ANGLE3)); m_driverController.povUp().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_SET_ANGLE2)); - m_driverController.y().onTrue(intakeSubsystem.deployCommand()); + /*m_driverController.y().onTrue(intakeSubsystem.deployCommand()); m_driverController.a().onTrue(intakeSubsystem.retractCommand()); m_driverController.b().onTrue(intakeSubsystem.reverseCommand());*/ diff --git a/src/main/java/frc/robot/commands/SetDeflectorCommand.java b/src/main/java/frc/robot/commands/SetDeflectorCommand.java index 0de002e..a670ed0 100644 --- a/src/main/java/frc/robot/commands/SetDeflectorCommand.java +++ b/src/main/java/frc/robot/commands/SetDeflectorCommand.java @@ -8,11 +8,9 @@ import frc.robot.subsystems.TurretSubsystem; import edu.wpi.first.units.measure.Angle; import edu.wpi.first.wpilibj2.command.Command; -//The Turret does NOT move, hood does NOT move, it will die - /** An example command that uses an example subsystem. **/ public class SetDeflectorCommand extends Command { - /*private final TurretSubsystem m_subsystem; + private final TurretSubsystem m_subsystem; private Angle deployAngle; public SetDeflectorCommand(TurretSubsystem subsystem, Angle deployAngle) { @@ -30,5 +28,5 @@ public class SetDeflectorCommand extends Command { @Override public boolean isFinished() { return true; - }*/ + } } diff --git a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java index 6ec7f39..26af31d 100644 --- a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java @@ -96,14 +96,4 @@ public class IntakeSubsystem extends TestableSubsystem { { return this.runOnce(() -> setSpeed(-.5)); } - - @PostTest(name = "A friendly name", enabled = true) - public void myFailingPostTest(){ - assertThat(true).isFalse(); - } - - @PostTest(enabled = true) - public void myPassingPostTest(){ - assertThat("Hello World").endWith("World"); - } } diff --git a/src/main/java/frc/robot/subsystems/TurretSubsystem.java b/src/main/java/frc/robot/subsystems/TurretSubsystem.java index 6ff3e83..0b40532 100644 --- a/src/main/java/frc/robot/subsystems/TurretSubsystem.java +++ b/src/main/java/frc/robot/subsystems/TurretSubsystem.java @@ -126,12 +126,12 @@ public class TurretSubsystem extends TestableSubsystem { private void periodicManual() { - //If the hood or turret move, it will be a uh-oh, so DONT MOVE THEM + //If the turret move, it will be a uh-oh, so DONT MOVE IT /*if(passedLimit()) { //turretMotor.set(0); - } + }*/ int k = 1; if(Constants.ShooterConstants.HOOD_SERVO_INVERTED) { @@ -153,6 +153,6 @@ public class TurretSubsystem extends TestableSubsystem { else { hood.set(0); - }*/ + } } }