Class CoralIntakeIOTalonFXReal

java.lang.Object
frc.alotobots.reefscape.subsystems.coralIntake.io.CoralIntakeIOTalonFXReal
All Implemented Interfaces:
CoralIntakeIO

public class CoralIntakeIOTalonFXReal extends Object implements CoralIntakeIO
Hardware implementation of the CoralIntakeIO interface for REV Robotics SparkFlex motor controllers and CANrange sensors. This implementation provides real hardware control and sensor feedback for the coral intake mechanism.
  • Constructor Details

    • CoralIntakeIOTalonFXReal

      public CoralIntakeIOTalonFXReal()
      Creates a new CoralIntakeIOVortexReal instance and configures all hardware devices. Sets up motor controller parameters, CANrange sensor configuration, and status signals.
  • Method Details

    • updateInputs

      public void updateInputs(CoralIntakeIO.CoralIntakeIOInputs inputs)
      Updates all input values with the latest hardware state.
      Specified by:
      updateInputs in interface CoralIntakeIO
      Parameters:
      inputs - The input object to update with new values
    • setIntakeOpenLoop

      public void setIntakeOpenLoop(double percent)
      Sets the intake motor to run at a specified percentage of full power.
      Specified by:
      setIntakeOpenLoop in interface CoralIntakeIO
      Parameters:
      percent - Motor output percentage (-1.0 to 1.0)
    • setIntakeVelocity

      public void setIntakeVelocity(AngularVelocity velocity, int pidSlot)
      Sets the intake motor to run at a specified velocity using closed-loop control. [NOT YET IMPLEMENTED]
      Specified by:
      setIntakeVelocity in interface CoralIntakeIO
      Parameters:
      velocity - Target velocity for the intake
      pidSlot - PID slot to use for velocity control
      Throws:
      UnsupportedOperationException - This feature is not yet implemented
    • getIntakeOccupied

      public boolean getIntakeOccupied()
      Gets the current game piece detection status from the CANrange sensor.
      Specified by:
      getIntakeOccupied in interface CoralIntakeIO
      Returns:
      true if a game piece is detected in the intake
    • stop

      public void stop()
      Stops all intake motor movement.
      Specified by:
      stop in interface CoralIntakeIO