Class RunCommand

All Implemented Interfaces:
Sendable, Command

public class RunCommand
extends FunctionalCommand
A command that runs a Runnable continuously. Has no end condition as-is; either subclass it or use Command.withTimeout(double) or Command.until(BooleanSupplier) to give it one. If you only wish to execute a Runnable once, use InstantCommand.

This class is provided by the NewCommands VendorDep

  • Constructor Details

    • RunCommand

      public RunCommand​(Runnable toRun, Subsystem... requirements)
      Creates a new RunCommand. The Runnable will be run continuously until the command ends. Does not run when disabled.
      Parameters:
      toRun - the Runnable to run
      requirements - the subsystems to require