Class FeedCommand

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

public class FeedCommand extends AbstractVelocityCommand<IndexerSubsystem>
Command that spins the indexer roller forward to feed Fuel into the shooter.

The target RPM supplier is evaluated once on initialize. The command finishes when the roller reaches the target velocity and has been stable for the configured settle time, indicating the piece has been launched into the shooter flywheels.

  • 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
    FeedCommand(IndexerSubsystem subsystem, double targetRpm)
    Creates a feed command that drives the roller to a fixed RPM.
    FeedCommand(IndexerSubsystem subsystem, Supplier<Double> targetRpmSupplier)
    Creates a feed 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

    • FeedCommand

      public FeedCommand(IndexerSubsystem subsystem, Supplier<Double> targetRpmSupplier)
      Creates a feed command that reads its target RPM from a supplier.
      Parameters:
      subsystem - indexer subsystem to control
      targetRpmSupplier - provider for the target feed RPM; evaluated on initialize
    • FeedCommand

      public FeedCommand(IndexerSubsystem subsystem, double targetRpm)
      Creates a feed command that drives the roller to a fixed RPM.
      Parameters:
      subsystem - indexer subsystem to control
      targetRpm - fixed target feed RPM (positive for forward into shooter)