Package xbot.common.command
Class BaseCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
xbot.common.command.BaseCommand
- All Implemented Interfaces:
Sendable
,IPropertySupport
- Direct Known Subclasses:
BaseMaintainerCommand
,BaseSequentialCommandGroup
,BaseSetpointCommand
,BaseWaitForMaintainerCommand
,ChangeActiveSwerveModuleCommand
,ConfigurePropertiesCommand
,DelayViaSupplierCommand
,PurePursuitCommand
,ResetDistanceCommand
,ResetSimulatorPositionCommand
,SetAutonomousCommand
,SetRobotHeadingCommand
,SimpleWaitForMaintainerCommand
,SwerveSimpleBezierCommand
,SwerveSimpleTrajectoryCommand
Enhanced version of WPILib's Command that allows for extension of existing
functionality.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AKitLogger
protected final org.apache.logging.log4j.Logger
protected final TimeLogger
protected final Alert
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
end
(boolean isInterrupted) void
void
includeOnSmartDashboard
(String label) void
void
requires
(BaseSubsystem subsystem) Deprecated.boolean
void
setRunsWhenDisabled
(boolean value) 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
-
Field Details
-
runningAlert
-
log
protected final org.apache.logging.log4j.Logger log -
aKitLog
-
monitor
-
-
Constructor Details
-
BaseCommand
public BaseCommand()
-
-
Method Details
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabled
in classCommand
-
setRunsWhenDisabled
public void setRunsWhenDisabled(boolean value) -
getPrefix
- Specified by:
getPrefix
in interfaceIPropertySupport
-
initialize
public void initialize()- Overrides:
initialize
in classCommand
-
end
public void end(boolean isInterrupted) -
includeOnSmartDashboard
public void includeOnSmartDashboard() -
includeOnSmartDashboard
-
requires
Deprecated.Suggest useCommand.addRequirements(edu.wpi.first.wpilibj2.command.Subsystem...)
instead.- Parameters:
subsystem
- Requirement to add
-
Command.addRequirements(edu.wpi.first.wpilibj2.command.Subsystem...)
instead.