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
ConstructorsConstructorDescriptionOnOffCommand(edu.wpi.first.wpilibj2.command.Command on, edu.wpi.first.wpilibj2.command.Command off) -
Method Summary
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
-
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 canceledoff- Opposite ofon- runs whenever this command is not running
-
-
Method Details
-
initialize
public final void initialize()- Overrides:
initializein classedu.wpi.first.wpilibj2.command.Command
-
end
public final void end(boolean interrupted) - Overrides:
endin classedu.wpi.first.wpilibj2.command.Command
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabledin classedu.wpi.first.wpilibj2.command.Command
-