Class EjectIntakeCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.shared.commands.AbstractSubsystemCommand<TSubsystem>
frc.robot.shared.commands.AbstractVelocityCommand<IntakeSubsystem>
frc.robot.subsystems.intake.commands.EjectIntakeCommand
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
Command that spins the intake rollers in reverse to eject Fuel back onto the field.
The target RPM supplier is evaluated once on initialize. Pass a negative RPM to reverse the roller direction. The command finishes when the rollers
reach the target velocity and have been stable for the configured settle time. Bind this with whileTrue so the rollers return to their
default idle when the operator releases the button.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Field Summary
Fields inherited from class frc.robot.shared.commands.AbstractSubsystemCommand
log, subsystem -
Constructor Summary
ConstructorsConstructorDescriptionEjectIntakeCommand(IntakeSubsystem subsystem, double targetRpm) Creates an eject command that drives the rollers at a fixed negative RPM.EjectIntakeCommand(IntakeSubsystem subsystem, Supplier<Double> targetRpmSupplier) Creates an eject command that reads its target RPM from a supplier. -
Method Summary
Methods inherited from class frc.robot.shared.commands.AbstractVelocityCommand
end, execute, isFinished, onInitializeMethods inherited from class frc.robot.shared.commands.AbstractSubsystemCommand
initializeMethods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
EjectIntakeCommand
Creates an eject command that reads its target RPM from a supplier.- Parameters:
subsystem- intake subsystem to controltargetRpmSupplier- provider for the target reverse RPM (negative value); evaluated on initialize
-
EjectIntakeCommand
Creates an eject command that drives the rollers at a fixed negative RPM.- Parameters:
subsystem- intake subsystem to controltargetRpm- fixed target reverse RPM (negative value for backward rotation)
-