Package frc.robot.subsystems.intake
Class Intake
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.intake.Intake
Intake Subsystem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the status of the indexer beam brake.boolean
Get the status of the intake beam brake.void
periodic()
runIndexerMotor
(double speed) Command to run the indexerrunIntakeMotor
(double intakeSpeed, double indexerSpeed) Command to run the intake motor and indexer until the sensor tripsrunIntakeMotorNonStop
(double intakeSpeed, double indexerSpeed) Command to run the intake motor and indexer until the sensor tripsvoid
setIndexerMotor
(double percentage) Set the power for the indexer motorvoid
setIntakeMotor
(double percentage) Set the power of both intake motorsMethods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
Intake
Intake Subsystem- Parameters:
io
- IO Layerviz
- Sim Visualization
-
-
Method Details
-
periodic
public void periodic() -
setIntakeMotor
public void setIntakeMotor(double percentage) Set the power of both intake motors- Parameters:
percentage
- 0-1 power for the intake motors
-
setIndexerMotor
public void setIndexerMotor(double percentage) Set the power for the indexer motor- Parameters:
percentage
- 0-1 power for the indexer motor
-
getIndexerBeamBrakeStatus
public boolean getIndexerBeamBrakeStatus()Get the status of the indexer beam brake.- Returns:
- True if beam brake is broken, False if open
-
getintakeBeamBrakeStatus
public boolean getintakeBeamBrakeStatus()Get the status of the intake beam brake.- Returns:
- True if beam brake is broken, False if open
-
runIntakeMotor
Command to run the intake motor and indexer until the sensor trips- Returns:
Command
to run the intake and indexer motors
-
runIntakeMotorNonStop
Command to run the intake motor and indexer until the sensor trips- Returns:
Command
to run the intake and indexer motors
-
runIndexerMotor
Command to run the indexer- Returns:
Command
to run the indexer motors
-