Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class RobotContainer {
() -> stateMachineInstance.tryState(RobotState.PREP_CORNER));

Command TRY_RETRACTING = Commands.deferredProxy(
() -> stateMachineInstance.tryState(RobotState.PREP_CORNER));
() -> stateMachineInstance.tryState(RobotState.RETRACT_INTAKE));

Command MANUAL = new DeferredCommand(
driverStateMachineInstance.tryState(
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/commands/states/Shooting.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ 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.setIntakeRollersPercentOutput(ConstRotors.INTAKE_ROLLERS_SPEED);
intakeAgitationTimer.restart();

}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if (!RobotContainer.motionInstance.getIntakePivotAngle().isNear(ConstMotion.RETRACT_INTAKE_PIVOT_ANGLE,
if (!RobotContainer.motionInstance.getIntakePivotAngle().isNear(ConstMotion.AGITATE_PIVOT_ANGLE,
ConstMotion.INTAKE_PIVOT_TOLERANCE)
&& intakeAgitationTimer.hasElapsed(ConstMotion.INTAKE_PIVOT_AGITATION_TIME)) {
RobotContainer.motionInstance.setIntakePivotAngle(ConstMotion.RETRACT_INTAKE_PIVOT_ANGLE);
RobotContainer.motionInstance.setIntakePivotAngle(ConstMotion.AGITATE_PIVOT_ANGLE);
intakeAgitationTimer.restart();

} else if (intakeAgitationTimer.hasElapsed((ConstMotion.INTAKE_PIVOT_AGITATION_TIME))) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/constants/ConstMotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@

/** Add your docs here. */
public class ConstMotion {
public static final Angle INTAKE_PIVOT_TOLERANCE = Degrees.of(1.0);
public static final Angle INTAKE_PIVOT_TOLERANCE = Degrees.of(5.0);
public static final Time INTAKE_PIVOT_AGITATION_TIME = Units.Seconds.of(1.0 / 3.0);
public static final TalonFXConfiguration INTAKE_PIVOT_CONFIGURATION = new TalonFXConfiguration();
public static final TalonFXConfiguration HOOD_PIVOT_CONFIGURATION = new TalonFXConfiguration();
public static final Angle DEPLOY_INTAKE_PIVOT_ANGLE = Degrees.of(125);
public static final Angle RETRACT_INTAKE_PIVOT_ANGLE = Degrees.of(0);
public static final Angle AGITATE_PIVOT_ANGLE = Degrees.of(63);
public static final Angle HOOD_PIVOT_ANGLE = Degrees.of(14);
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_NONE_ANGLE = Degrees.of(3.2);
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);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/subsystems/Motion.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class Motion extends SubsystemBase {
public Motion() {
intakePivot.getConfigurator().apply(ConstMotion.INTAKE_PIVOT_CONFIGURATION);
hoodPivot.getConfigurator().apply(ConstMotion.HOOD_PIVOT_CONFIGURATION);
hoodPivot.setPosition(ConstMotion.HOOD_NONE_ANGLE);
}
Comment thread
TaylerUva marked this conversation as resolved.

/**
Expand Down
Loading