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 TypeMethodDescriptionbooleanGets the current game piece detection status from the CANrange sensor.voidsetIntakeOpenLoop(double percent) Sets the intake motor to run at a specified percentage of full power.voidsetIntakeVelocity(AngularVelocity velocity, int pidSlot) Sets the intake motor to run at a specified velocity using closed-loop control.voidstop()Stops all intake motor movement.voidUpdates 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:
updateInputsin 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:
setIntakeOpenLoopin 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:
setIntakeVelocityin 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:
getIntakeOccupiedin interfaceCoralIntakeIO- Returns:
- true if a game piece is detected in the intake
-
stop
public void stop()Stops all intake motor movement.- Specified by:
stopin interfaceCoralIntakeIO
-