Skip to content

Commit

Permalink
added through-bore encoder code for intake
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Mar 11, 2024
1 parent d4e4ccc commit 6f581e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.revrobotics.CANSparkLowLevel.MotorType;
import com.revrobotics.CANSparkMax;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.SparkMaxAlternateEncoder;
import com.revrobotics.CANSparkBase.SoftLimitDirection;

import edu.wpi.first.math.MathUtil;
Expand Down Expand Up @@ -53,7 +54,7 @@ public IntakeSubsystem() {
_feedMotor = new CANSparkMax(Constants.CAN.INTAKE_FEED, MotorType.kBrushless);
_actuatorMotor = new CANSparkMax(Constants.CAN.INTAKE_ACTUATOR, MotorType.kBrushless);

_actuatorEncoder = _actuatorMotor.getEncoder();
_actuatorEncoder = _actuatorMotor.getAlternateEncoder(SparkMaxAlternateEncoder.Type.kQuadrature, 8192);
_actuatorEncoder.setPosition(0);

_feedEncoder = _feedMotor.getEncoder();
Expand Down

0 comments on commit 6f581e0

Please sign in to comment.