Class BaseCommand
java.lang.Object
org.wpilib.command2.Command
xbot.common.command.BaseCommand
- All Implemented Interfaces:
AutoCloseable, org.wpilib.telemetry.TelemetryLoggable, org.wpilib.tunable.ComplexTunable, TunablePrefixProvider
- Direct Known Subclasses:
BaseMaintainerCommand, BaseParallelCommandGroup, BaseParallelDeadlineGroup, BaseSequentialCommandGroup, BaseSetpointCommand, BaseWaitForMaintainerCommand, ChangeActiveSwerveModuleCommand, DebugSwerveModuleCommand, DelayViaSupplierCommand, PurePursuitCommand, ResetDistanceCommand, SetAutonomousCommand, SetRobotHeadingCommand, SimpleWaitForMaintainerCommand, SwerveSimpleBezierCommand, SwerveSimpleTrajectoryCommand
public abstract class BaseCommand
extends org.wpilib.command2.Command
implements AutoCloseable, TunablePrefixProvider
Enhanced version of WPILib's Command that allows for extension of existing functionality.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.wpilib.command2.Command
org.wpilib.command2.Command.InterruptionBehavior -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AKitLoggerprotected final org.apache.logging.log4j.Loggerprotected final TimeLoggerprotected final org.wpilib.util.Alert -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases the native alert allocation when this command will no longer be used.voidend(boolean isInterrupted) voidvoidvoidpublishToTunables(String label) booleanvoidsetRunsWhenDisabled(boolean value) Methods inherited from class org.wpilib.command2.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, execute, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getTelemetryType, getTunableType, handleInterrupt, hasRequirement, ignoringDisable, isFinished, isScheduled, logTo, onlyIf, onlyWhile, publishTunable, raceWith, repeatedly, setName, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeoutMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wpilib.tunable.ComplexTunable
publishChildTunable, publishChildTunable, removeChildTunable, setChildTunableChanged, updateTunable
-
Field Details
-
runningAlert
protected final org.wpilib.util.Alert runningAlert -
log
protected final org.apache.logging.log4j.Logger log -
aKitLog
-
monitor
-
-
Constructor Details
-
BaseCommand
public BaseCommand()
-
-
Method Details
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabledin classorg.wpilib.command2.Command
-
setRunsWhenDisabled
public void setRunsWhenDisabled(boolean value) -
getPrefix
- Specified by:
getPrefixin interfaceTunablePrefixProvider
-
initialize
public void initialize()- Overrides:
initializein classorg.wpilib.command2.Command
-
end
public void end(boolean isInterrupted) - Overrides:
endin classorg.wpilib.command2.Command
-
close
public void close()Releases the native alert allocation when this command will no longer be used.- Specified by:
closein interfaceAutoCloseable
-
publishToTunables
public void publishToTunables() -
publishToTunables
-