Package frc.lib.util

Class DisabledInstantCommand

All Implemented Interfaces:
Sendable

public class DisabledInstantCommand extends InstantCommand
A Command that runs instantly; it will initialize, execute once, and end on the same iteration of the scheduler. Users can either pass in a Runnable and a set of requirements, or else subclass this command if desired.

This command works while the robot is disabled.

  • Constructor Details

    • DisabledInstantCommand

      public DisabledInstantCommand(Runnable toRun, Subsystem... requirements)
      Creates a new InstantCommand that runs the given Runnable with the given requirements.

      This command works while the robot is disabled.

      Parameters:
      toRun - the Runnable to run
      requirements - the subsystems required by this command
  • Method Details