Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into autos
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjcoderman committed Nov 9, 2023
2 parents 1c7390f + fd5e8d8 commit 3b825fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/frc/robot/intake/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public IntakeSubsystem(CANSparkMax motor) {
super(SubsystemPriority.INTAKE);
this.motor = motor;
encoder = motor.getEncoder();
encoder.setPositionConversionFactor(1.0);
encoder.setVelocityConversionFactor(1.0);
}

Expand Down Expand Up @@ -87,10 +88,10 @@ public void enabledPeriodic() {
gamePiece = HeldGamePiece.CONE;
} else if (motorVelocity < threshold && goalState == IntakeState.INTAKE_CUBE) {
gamePiece = HeldGamePiece.CUBE;
} else if (motorVelocity > threshold
&& (goalState == IntakeState.OUTTAKE_CONE || goalState == IntakeState.OUTTAKE_CUBE)) {
gamePiece = HeldGamePiece.NOTHING;
}
} else if (motorVelocity > threshold
&& (goalState == IntakeState.OUTTAKE_CONE || goalState == IntakeState.OUTTAKE_CUBE)) {
gamePiece = HeldGamePiece.NOTHING;
}
}

Expand Down

0 comments on commit 3b825fb

Please sign in to comment.