Class TimedCommand

java.lang.Object
edu.wpi.first.wpilibj.command.Command
edu.wpi.first.wpilibj.command.TimedCommand
All Implemented Interfaces:
Sendable, AutoCloseable
Direct Known Subclasses:
WaitCommand

public class TimedCommand
extends Command
A TimedCommand will wait for a timeout before finishing. TimedCommand is used to execute a command for a given amount of time.

This class is provided by the OldCommands VendorDep

  • Constructor Details

    • TimedCommand

      public TimedCommand​(String name, double timeout)
      Instantiates a TimedCommand with the given name and timeout.
      Parameters:
      name - the name of the command
      timeout - the time the command takes to run (seconds)
    • TimedCommand

      public TimedCommand​(double timeout)
      Instantiates a TimedCommand with the given timeout.
      Parameters:
      timeout - the time the command takes to run (seconds)
    • TimedCommand

      public TimedCommand​(String name, double timeout, Subsystem subsystem)
      Instantiates a TimedCommand with the given name and timeout.
      Parameters:
      name - the name of the command
      timeout - the time the command takes to run (seconds)
      subsystem - the subsystem that this command requires
    • TimedCommand

      public TimedCommand​(double timeout, Subsystem subsystem)
      Instantiates a TimedCommand with the given timeout.
      Parameters:
      timeout - the time the command takes to run (seconds)
      subsystem - the subsystem that this command requires
  • Method Details