Class CoralIntakeIOTalonFXReal
java.lang.Object
frc.alotobots.reefscape.subsystems.coralIntake.io.CoralIntakeIOTalonFXReal
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.alotobots.reefscape.subsystems.coralIntake.io.CoralIntakeIO
CoralIntakeIO.CoralIntakeIOInputs
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CoralIntakeIOVortexReal instance and configures all hardware devices. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the current game piece detection status from the CANrange sensor.void
setIntakeOpenLoop
(double percent) Sets the intake motor to run at a specified percentage of full power.void
setIntakeVelocity
(AngularVelocity velocity, int pidSlot) Sets the intake motor to run at a specified velocity using closed-loop control.void
stop()
Stops all intake motor movement.void
Updates all input values with the latest hardware state.
-
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
Updates all input values with the latest hardware state.- Specified by:
updateInputs
in interfaceCoralIntakeIO
- 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 interfaceCoralIntakeIO
- Parameters:
percent
- Motor output percentage (-1.0 to 1.0)
-
setIntakeVelocity
Sets the intake motor to run at a specified velocity using closed-loop control. [NOT YET IMPLEMENTED]- Specified by:
setIntakeVelocity
in interfaceCoralIntakeIO
- Parameters:
velocity
- Target velocity for the intakepidSlot
- 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 interfaceCoralIntakeIO
- Returns:
- true if a game piece is detected in the intake
-
stop
public void stop()Stops all intake motor movement.- Specified by:
stop
in interfaceCoralIntakeIO
-