Package lib.commands

Class AlwaysRunnableInstantCommand

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.FunctionalCommand
edu.wpi.first.wpilibj2.command.InstantCommand
lib.commands.AlwaysRunnableInstantCommand
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class AlwaysRunnableInstantCommand extends edu.wpi.first.wpilibj2.command.InstantCommand
InstantCommand that can run when the robot is disabled. Useful for things like zeroing motors that do NOT move any part of the robot.
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command

    edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior
  • Constructor Summary

    Constructors
    Constructor
    Description
    AlwaysRunnableInstantCommand(Runnable toRun, edu.wpi.first.wpilibj2.command.Subsystem... requirements)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     

    Methods inherited from class edu.wpi.first.wpilibj2.command.FunctionalCommand

    end, execute, initialize, isFinished

    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, 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

    • AlwaysRunnableInstantCommand

      public AlwaysRunnableInstantCommand(Runnable toRun, edu.wpi.first.wpilibj2.command.Subsystem... requirements)
  • Method Details

    • runsWhenDisabled

      public boolean runsWhenDisabled()
      Overrides:
      runsWhenDisabled in class edu.wpi.first.wpilibj2.command.Command