Package lib.commands

Class OnOffCommand

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

public class OnOffCommand extends edu.wpi.first.wpilibj2.command.Command
  • 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
    OnOffCommand(edu.wpi.first.wpilibj2.command.Command on, edu.wpi.first.wpilibj2.command.Command off)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    end(boolean interrupted)
     
    final void
     
    boolean
     

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

    addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, execute, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isFinished, 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

    • OnOffCommand

      public OnOffCommand(edu.wpi.first.wpilibj2.command.Command on, edu.wpi.first.wpilibj2.command.Command off)
      Parameters:
      on - Command that will be initialized when this command initializes, and canceled when this command is canceled
      off - Opposite of on - runs whenever this command is not running
  • Method Details

    • initialize

      public final void initialize()
      Overrides:
      initialize in class edu.wpi.first.wpilibj2.command.Command
    • end

      public final void end(boolean interrupted)
      Overrides:
      end in class edu.wpi.first.wpilibj2.command.Command
    • runsWhenDisabled

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