Skip to content
Draft
1 change: 0 additions & 1 deletion src/main/java/frc/robot/commands/DriveManual.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import frc.robot.constants.ConstDrivetrain;
import frc.robot.constants.ConstField;
import frc.robot.subsystems.DriverStateMachine.DriverState;
import frc.robot.subsystems.Drivetrain;

public class DriveManual extends Command {
DoubleSupplier xAxis, yAxis, rotationXAxis;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/commands/states/EjectingHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public EjectingHopper() {
public void initialize() {
RobotContainer.stateMachineInstance.setRobotState(StateMachine.RobotState.EJECTING_HOPPER);
RobotContainer.motionInstance.setIntakePivotAngle(ConstMotion.DEPLOY_INTAKE_PIVOT_ANGLE);
RobotContainer.rotorsInstance.setIntakeRollersPercentOutput(ConstRotors.REVERSE_SERIALIZER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.REVERSE_TRANSFER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_INTAKE_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setIntakeRollersPercentOutput(ConstRotors.EJECTING_INTAKE_ROLLERS_EAST_SPEED);
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.EJECTING_SERIALIZER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_TRANSFER_ROLLERS_EAST_SPEED);
}

// Called every time the scheduler runs while the command is scheduled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public ReversingShooter() {
// Called when the command is initially scheduled.
@Override
public void initialize() {
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_SHOOTING_SPEED);
RobotContainer.rotorsInstance.setFlywheelPercentOutput(ConstRotors.REVERSE_SHOOTING_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_TRANSFER_ROLLERS_EAST_SPEED);
RobotContainer.rotorsInstance.setFlywheelPercentOutput(ConstRotors.REVERSE_FLYWHEEL_SPEED);
RobotContainer.stateMachineInstance.setRobotState(StateMachine.RobotState.REVERSING_SHOOTER);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/states/Shooting.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Shooting() {
public void initialize() {
RobotContainer.stateMachineInstance.setRobotState((StateMachine.RobotState.SHOOTING));
RobotContainer.rotorsInstance.setTransferRollersSpeeds(ConstRotors.TRANSFER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.SERIALIZER_SHOOTING_SPEED);
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.SERIALIZER_ROLLERS_SPEED);
intakeAgitationTimer.restart();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class PrepCorner extends BasePrep {
/** Creates a new PrepNonOutpost. */
public PrepCorner() {
super(ConstRotors.FLYWHEEL_CORNER_SPEED, ConstMotion.HOOD_CORNER_ANGLE, RobotState.PREP_CORNER);
super(ConstRotors.FLYWHEEL_PREP_CORNER_SPEED, ConstMotion.HOOD_PREP_CORNER_ANGLE, RobotState.PREP_CORNER);

// Use addRequirements() here to declare subsystem dependencies.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class PrepHub extends BasePrep {
/** Creates a new PrepDepot. */
public PrepHub() {

super(ConstRotors.FLYWHEEL_HUB_SPEED, ConstMotion.HOOD_HUB_ANGLE, RobotState.PREP_HUB);
super(ConstRotors.FLYWHEEL_PREP_HUB_SPEED, ConstMotion.HOOD_PREP_HUB_ANGLE, RobotState.PREP_HUB);

// setState
// Use addRequirements() here to declare subsystem dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class PrepNeutralToAlliance extends BasePrep {
/** Creates a new PrepNeautralToAlliance. */
public PrepNeutralToAlliance() {

super(ConstRotors.FLYWHEEL_NEUTRAL_TO_ALLIANCE_SPEED, ConstMotion.HOOD_NEUTRAL_TO_ALLIANCE_ANGLE,
super(ConstRotors.FLYWHEEL_PREP_NEUTRAL_TO_ALLIANCE_SPEED, ConstMotion.HOOD_PREP_NEUTRAL_TO_ALLIANCE_ANGLE,
RobotState.PREP_NEUTRAL_TO_ALLIANCE);

// Use addRequirements() here to declare subsystem dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PrepOpponentToAlliance extends BasePrep {
/** Creates a new PrepOpponentToAlliance. */
public PrepOpponentToAlliance() {

super(ConstRotors.FLYWHEEL_OPPONENT_TO_ALLIANCE_SPEED, ConstMotion.HOOD_OPPENENT_TO_ALLIANCE_ANGLE,
super(ConstRotors.FLYWHEEL_PREP_OPPONENT_TO_ALLIANCE_SPEED, ConstMotion.HOOD_PREP_OPPONENT_TO_ALLIANCE_ANGLE,
RobotState.PREP_OPPONENT_TO_ALLIANCE);

// Use addRequirements() here to declare subsystem dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PrepTower extends BasePrep {
/** Creates a new PrepOutpost. */
public PrepTower() {

super(ConstRotors.FLYWHEEL_TOWER_SPEED, ConstMotion.HOOD_TOWER_ANGLE, RobotState.PREP_TOWER);
super(ConstRotors.FLYWHEEL_PREP_TOWER_SPEED, ConstMotion.HOOD_PREP_TOWER_ANGLE, RobotState.PREP_TOWER);

// Use addRequirements() here to declare subsystem dependencies.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PrepTrench extends BasePrep {
/** Creates a new PrepTrench. */
public PrepTrench() {

super(ConstRotors.FLYWHEEL_TRENCH_SPEED, ConstMotion.HOOD_TRENCH_ANGLE, RobotState.PREP_TRENCH);
super(ConstRotors.FLYWHEEL_PREP_TRENCH_SPEED, ConstMotion.HOOD_PREP_TRENCH_ANGLE, RobotState.PREP_TRENCH);

// Use addRequirements() here to declare subsystem dependencies.
}
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/frc/robot/constants/ConstMotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public class ConstMotion {
public static final Angle HOOD_PIVOT_ANGLE_RETRACT = Degrees.of(0);
public static final double STOP = 0;
public static final Angle HOOD_NONE_ANGLE = Degrees.of(0);
public static final Angle HOOD_TRENCH_ANGLE = Units.Degrees.of(13);
public static final Angle HOOD_CORNER_ANGLE = Units.Degrees.of(23.5);
public static final Angle HOOD_TOWER_ANGLE = Units.Degrees.of(14);
public static final Angle HOOD_HUB_ANGLE = Units.Degrees.of(9.5);
public static final Angle HOOD_ANYWHERE_ANGLE = Units.Degrees.of(45);
public static final Angle HOOD_NEUTRAL_TO_ALLIANCE_ANGLE = Units.Degrees.of(45);
public static final Angle HOOD_OPPENENT_TO_ALLIANCE_ANGLE = Units.Degrees.of(37);
public static final Angle HOOD_PREP_TRENCH_ANGLE = Units.Degrees.of(13);
public static final Angle HOOD_PREP_CORNER_ANGLE = Units.Degrees.of(23.5);
public static final Angle HOOD_PREP_TOWER_ANGLE = Units.Degrees.of(14);
public static final Angle HOOD_PREP_HUB_ANGLE = Units.Degrees.of(9.5);
public static final Angle HOOD_PREP_ANYWHERE_ANGLE = Units.Degrees.of(45);
public static final Angle HOOD_PREP_NEUTRAL_TO_ALLIANCE_ANGLE = Units.Degrees.of(45);
public static final Angle HOOD_PREP_OPPONENT_TO_ALLIANCE_ANGLE = Units.Degrees.of(37);

static {

Expand Down
28 changes: 12 additions & 16 deletions src/main/java/frc/robot/constants/ConstRotors.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,27 @@ public class ConstRotors {

public static final TalonFXConfiguration FLYWHEEL_EAST_CONFIGURATION = new TalonFXConfiguration();
public static final TalonFXConfiguration FLYWHEEL_WEST_CONFIGURATION = new TalonFXConfiguration();
public static final AngularVelocity FLYWHEEL_CORNER_SPEED = Units.RPM.of(4250);
public static final AngularVelocity FLYWHEEL_HUB_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_TRENCH_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_TOWER_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_ANYWHERE_SPEED = Units.RPM.of(4100);
public static final AngularVelocity FLYWHEEL_NEUTRAL_TO_ALLIANCE_SPEED = Units.RPM.of(3700);
public static final AngularVelocity FLYWHEEL_OPPONENT_TO_ALLIANCE_SPEED = Units.RPM.of(6400);
public static final AngularVelocity FLYWHEEL_PREP_CORNER_SPEED = Units.RPM.of(4250);
public static final AngularVelocity FLYWHEEL_PREP_HUB_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_PREP_TRENCH_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_PREP_TOWER_SPEED = Units.RPM.of(4000);
public static final AngularVelocity FLYWHEEL_PREP_ANYWHERE_SPEED = Units.RPM.of(4100);
public static final AngularVelocity FLYWHEEL_PREP_NEUTRAL_TO_ALLIANCE_SPEED = Units.RPM.of(3700);
public static final AngularVelocity FLYWHEEL_PREP_OPPONENT_TO_ALLIANCE_SPEED = Units.RPM.of(6400);

public static final double INTAKE_ROLLERS_SPEED = 1;
public static final AngularVelocity FLYWHEEL_SHOOTING_SPEED = Units.RPM.of(1000);
// public static final AngularVelocity INTAKE_ROLLER_SPEED = Units.RPM.of(2000);
public static final double SERIALIZER_SHOOTING_SPEED = 1;
public static final double SERIALIZER_ROLLERS_SPEED = 1;
public static final double STOP = 0;
public static final AngularVelocity TRANSFER_ROLLERS_SPEED = Units.RPM.of(3400);
public static final AngularVelocity FLYWHEEL_TOLERANCE = Units.RPM.of(100);
public static final double REVERSE_SHOOTING_SPEED = -1;
public static final double REVERSE_SERIALIZER_ROLLERS_SPEED = -1;
public static final double REVERSE_INTAKE_ROLLERS_SPEED = -1;
public static final double REVERSE_TRANSFER_ROLLERS_SPEED = -1;
public static final double REVERSE_FLYWHEEL_SPEED = -1;
public static final double EJECTING_SERIALIZER_ROLLERS_SPEED = -1;
public static final double EJECTING_INTAKE_ROLLERS_EAST_SPEED = -1;
public static final double REVERSE_TRANSFER_ROLLERS_EAST_SPEED = -1;

static {

// SHOOTER_TRANSFER_EAST_CONFIGURATION.MotorOutput.NeutralMode =
// NeutralModeValue.Coast;/

FLYWHEEL_WEST_CONFIGURATION.MotorOutput.NeutralMode = NeutralModeValue.Coast;
FLYWHEEL_WEST_CONFIGURATION.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive;
FLYWHEEL_WEST_CONFIGURATION.Slot0.kS = 0.14;
Expand Down
Loading