Trouble with redline encoder not working

Hello!

My name is Caden, I am the lead programmer on team FYRE 5480. We are currently using an encoder for our intake. It is this encoder kit. We wired it up and it worked for a while, but after a recent power-on, it stopped giving us a value. No code (to my knowledge) has been changed, nor has the wiring. Details about our current configuration and debugging will be listed below. Any help would be greatly appreciated. Thanks.

Current wiring Configuration:

  • quadrature output port on the encoder board.
  • PWM wire 1 - DIO port 0
    • Brown to black
    • Orange to red
    • Yellow to white
  • PWM wire 2 - DIO port 1
    • Blue to white
  • Both PWM wires are fully seated in the DIO pins on the roboRIO for their respective ports, with the white wires facing inward (closest to the DIO letters on the roboRIO)

Current programming Configuration:

  • in our intake subsystem:
// The encoder for the intake actuation.
private final Encoder intakeEncoder = new Encoder(
    IntakeConstants.intakeEncoderA,
    IntakeConstants.intakeEncoderB,
    false, 
    Encoder.EncodingType.k4X
);
/**
 * Returns the position of the intake encoder.

 * @return - The integer value of the rotational position of the encoder.
 */
public double getEncoderDistance() {
    return intakeEncoder.getDistance();
}
@Override
public void periodic() {
    System.out.println(intakeEncoder.getDistance()); // <-- this spams "0.0"
}
  • in our constants file
// ENCODER VALUES //

// The a channel of the intake encoder
public static final int intakeEncoderA = 0;

// The b channel of the intake encoder
public static final int intakeEncoderB = 1;

Our full code repository can be found here. We are currently working on the subsystems-commands branch, so if you take a look at the code, please ensure that you are on the correct branch.