Package xbot.common.command
Class SimpleWaitForMaintainerCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
xbot.common.command.BaseCommand
xbot.common.command.SimpleWaitForMaintainerCommand
- All Implemented Interfaces:
Sendable
,IPropertySupport
Command that waits for a maintainer to be at its goal or until a timeout.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
Fields inherited from class xbot.common.command.BaseCommand
aKitLog, log, monitor
-
Constructor Summary
ConstructorDescriptionSimpleWaitForMaintainerCommand
(BaseSetpointSubsystem<?> subsystem, Supplier<Double> delaySupplier) Creates a new SimpleWaitForMaintainerCommand instance. -
Method Summary
Methods inherited from class xbot.common.command.BaseCommand
getPrefix, includeOnSmartDashboard, includeOnSmartDashboard, requires, runsWhenDisabled, setRunsWhenDisabled
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, end, 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
-
Constructor Details
-
SimpleWaitForMaintainerCommand
public SimpleWaitForMaintainerCommand(BaseSetpointSubsystem<?> subsystem, Supplier<Double> delaySupplier) Creates a new SimpleWaitForMaintainerCommand instance.- Parameters:
subsystem
- The maintainer subsystem.delaySupplier
- The timeout duration in seconds via a supplier.
-
-
Method Details
-
initialize
public void initialize()- Specified by:
initialize
in classBaseCommand
-
execute
public void execute() -
isFinished
public boolean isFinished()- Overrides:
isFinished
in classCommand
-