Class ReverseFeederCommand

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class ReverseFeederCommand extends AbstractVelocityCommand<FeederSubsystem>
Command that spins the feeder belt in reverse to clear Fuel back toward the intake.

The target RPM supplier is evaluated once on initialize. Pass a negative RPM to reverse the belt direction. The command finishes when the belt reaches the target velocity and has been stable for the configured settle time. Bind this with whileTrue so the belt returns to its default forward 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

    Constructors
    Constructor
    Description
    ReverseFeederCommand(FeederSubsystem subsystem, double targetRpm)
    Creates a reverse command that drives the belt at a fixed negative RPM.
    ReverseFeederCommand(FeederSubsystem subsystem, Supplier<Double> targetRpmSupplier)
    Creates a reverse command that reads its target RPM from a supplier.
  • Method Summary

    Methods inherited from class frc.robot.shared.commands.AbstractVelocityCommand

    end, execute, isFinished, onInitialize

    Methods inherited from class frc.robot.shared.commands.AbstractSubsystemCommand

    initialize

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReverseFeederCommand

      public ReverseFeederCommand(FeederSubsystem subsystem, Supplier<Double> targetRpmSupplier)
      Creates a reverse command that reads its target RPM from a supplier.
      Parameters:
      subsystem - feeder subsystem to control
      targetRpmSupplier - provider for the target reverse RPM (negative value); evaluated on initialize
    • ReverseFeederCommand

      public ReverseFeederCommand(FeederSubsystem subsystem, double targetRpm)
      Creates a reverse command that drives the belt at a fixed negative RPM.
      Parameters:
      subsystem - feeder subsystem to control
      targetRpm - fixed target reverse RPM (negative value for backward rotation)