Reenabled Deflector
This commit is contained in:
parent
8b0dc4457d
commit
63cb6d99bc
|
|
@ -90,13 +90,13 @@ public final class Constants {
|
||||||
public static final int HOOD_SERVO_CHANNEL = 0;
|
public static final int HOOD_SERVO_CHANNEL = 0;
|
||||||
public static final boolean HOOD_SERVO_INVERTED = true; // TODO: Test this
|
public static final boolean HOOD_SERVO_INVERTED = true; // TODO: Test this
|
||||||
public static final int HOOD_ENCODER_ID = 0;
|
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 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(0);
|
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 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_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_ANGLE1 = edu.wpi.first.units.Units.Degrees.of(20);
|
||||||
public static final Angle DEFLECTOR_SET_ANGLE2 = edu.wpi.first.units.Units.Degrees.of(0);
|
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(0);
|
public static final Angle DEFLECTOR_SET_ANGLE3 = edu.wpi.first.units.Units.Degrees.of(60);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HopperConstants {
|
public static class HopperConstants {
|
||||||
|
|
|
||||||
|
|
@ -66,14 +66,12 @@ public class RobotContainer {
|
||||||
turretSubsystem.setDefaultCommand(new ManualShootCommand(turretSubsystem, m_driverController.getHID()));
|
turretSubsystem.setDefaultCommand(new ManualShootCommand(turretSubsystem, m_driverController.getHID()));
|
||||||
hopperSubsystem.setDefaultCommand(new ManualHopperCommand(hopperSubsystem, 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.povLeft().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_SET_ANGLE1));
|
||||||
m_driverController.povRight().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_SET_ANGLE3));
|
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.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.a().onTrue(intakeSubsystem.retractCommand());
|
||||||
m_driverController.b().onTrue(intakeSubsystem.reverseCommand());*/
|
m_driverController.b().onTrue(intakeSubsystem.reverseCommand());*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,9 @@ import frc.robot.subsystems.TurretSubsystem;
|
||||||
import edu.wpi.first.units.measure.Angle;
|
import edu.wpi.first.units.measure.Angle;
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
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. **/
|
/** An example command that uses an example subsystem. **/
|
||||||
public class SetDeflectorCommand extends Command {
|
public class SetDeflectorCommand extends Command {
|
||||||
/*private final TurretSubsystem m_subsystem;
|
private final TurretSubsystem m_subsystem;
|
||||||
private Angle deployAngle;
|
private Angle deployAngle;
|
||||||
|
|
||||||
public SetDeflectorCommand(TurretSubsystem subsystem, Angle deployAngle) {
|
public SetDeflectorCommand(TurretSubsystem subsystem, Angle deployAngle) {
|
||||||
|
|
@ -30,5 +28,5 @@ public class SetDeflectorCommand extends Command {
|
||||||
@Override
|
@Override
|
||||||
public boolean isFinished() {
|
public boolean isFinished() {
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,4 @@ public class IntakeSubsystem extends TestableSubsystem {
|
||||||
{
|
{
|
||||||
return this.runOnce(() -> setSpeed(-.5));
|
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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,12 @@ public class TurretSubsystem extends TestableSubsystem {
|
||||||
|
|
||||||
private void periodicManual()
|
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())
|
/*if(passedLimit())
|
||||||
{
|
{
|
||||||
//turretMotor.set(0);
|
//turretMotor.set(0);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
int k = 1;
|
int k = 1;
|
||||||
if(Constants.ShooterConstants.HOOD_SERVO_INVERTED) {
|
if(Constants.ShooterConstants.HOOD_SERVO_INVERTED) {
|
||||||
|
|
@ -153,6 +153,6 @@ public class TurretSubsystem extends TestableSubsystem {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hood.set(0);
|
hood.set(0);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue