Reenabled Deflector

This commit is contained in:
TheRealGrayden 2026-03-13 08:41:19 -04:00
parent 8b0dc4457d
commit 63cb6d99bc
5 changed files with 12 additions and 26 deletions

View File

@ -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 {

View File

@ -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());*/

View File

@ -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;
}*/
}
}

View File

@ -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");
}
}

View File

@ -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);
}*/
}
}
}