Changes
This commit is contained in:
parent
7bce2b2a00
commit
c54efe42a5
|
|
@ -68,10 +68,10 @@ public final class Constants {
|
|||
}
|
||||
|
||||
public static class IntakeConstants {
|
||||
public static final int DEPLOY_MOTOR_ID = 12;
|
||||
public static final boolean DEPLOY_MOTOR_INVERTED = true; // TODO: Test this
|
||||
public static final int DEPLOY_MOTOR_ID = 17;
|
||||
public static final boolean DEPLOY_MOTOR_INVERTED = false; // TODO: Test this
|
||||
|
||||
public static final int INTAKE_MOTOR_ID = 1;
|
||||
public static final int INTAKE_MOTOR_ID = 0;
|
||||
public static final InvertedValue INTAKE_MOTOR_DIRECTION = InvertedValue.Clockwise_Positive; // TODO: Test this
|
||||
}
|
||||
|
||||
|
|
@ -79,31 +79,31 @@ public final class Constants {
|
|||
public static final int LAUNCHER_MOTOR_ID = 2;
|
||||
public static final boolean LAUNCHER_MOTOR_INVERTED = true; // TODO: Test this
|
||||
|
||||
public static final int TURRET_MOTOR_ID = 1;
|
||||
public static final int TURRET_MOTOR_ID = 0;
|
||||
public static final InvertedValue TURRET_MOTOR_DIRECTION = InvertedValue.CounterClockwise_Positive;
|
||||
public static final int TURRET_LIMIT_CHANNEL = 0;
|
||||
public static final Angle LIMIT_AXIMUTH_POS = edu.wpi.first.units.Units.Degrees.of(265);
|
||||
public static final Angle LIMIT_AXIMUTH_NEG = edu.wpi.first.units.Units.Degrees.of(5);
|
||||
public static final double HOMING_SPEED = .35;
|
||||
public static final double TURRET_GEAR_RATIO = 1;
|
||||
public static final double TURRET_GEAR_RATIO = 0;
|
||||
|
||||
public static final int HOOD_SERVO_CHANNEL = 3;
|
||||
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 = 4;
|
||||
public static final Angle TARGET_ELEVATION_DIF = edu.wpi.first.units.Units.Degrees.of(1);
|
||||
public static final Angle LIMIT_ELEVATION_POS = edu.wpi.first.units.Units.Degrees.of(90);
|
||||
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 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(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 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 class HopperConstants {
|
||||
public static final int KICKER_MOTOR_ID = 0;
|
||||
public static final int KICKER_MOTOR_ID = 9;
|
||||
public static final InvertedValue KICKER_MOTOR_DIRECTION = InvertedValue.CounterClockwise_Positive;
|
||||
|
||||
public static final int SPINDEXER_MOTOR_ID = 1;
|
||||
public static final int SPINDEXER_MOTOR_ID = 8;
|
||||
public static final InvertedValue SPINDEXER_MOTOR_DIRECTION = InvertedValue.Clockwise_Positive;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,12 +65,14 @@ public class RobotContainer {
|
|||
turretSubsystem.setDefaultCommand(new ManualShootCommand(turretSubsystem, m_driverController.getHID()));
|
||||
hopperSubsystem.setDefaultCommand(new ManualHopperCommand(hopperSubsystem, m_driverController.getHID()));
|
||||
|
||||
m_driverController.povDown().onTrue(new SetDeflectorCommand(turretSubsystem, Constants.ShooterConstants.DEFLECTOR_STORED_ANGLE));
|
||||
//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.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());*/
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class ManualHopperCommand extends Command {
|
|||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {
|
||||
m_subsystem.spin(.5);
|
||||
m_subsystem.spin(0);
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ 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) {
|
||||
|
|
@ -28,5 +30,5 @@ public class SetDeflectorCommand extends Command {
|
|||
@Override
|
||||
public boolean isFinished() {
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,9 @@ public class TurretSubsystem extends TestableSubsystem {
|
|||
|
||||
private void periodicManual()
|
||||
{
|
||||
if(passedLimit())
|
||||
//If the hood or turret move, it will be a uh-oh, so DONT MOVE THEM
|
||||
|
||||
/*if(passedLimit())
|
||||
{
|
||||
//turretMotor.set(0);
|
||||
}
|
||||
|
|
@ -151,6 +153,6 @@ public class TurretSubsystem extends TestableSubsystem {
|
|||
else
|
||||
{
|
||||
hood.set(0);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue