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

    Fields
    Modifier and Type
    Field
    Description
    protected final AKitLogger
     
    protected final org.apache.logging.log4j.Logger
     
    protected final TimeLogger
     
    protected final org.wpilib.util.Alert
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases the native alert allocation when this command will no longer be used.
    void
    end(boolean isInterrupted)
     
     
    void
     
    void
     
    void
     
    boolean
     
    void
    setRunsWhenDisabled(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, withTimeout

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      protected final AKitLogger aKitLog
    • monitor

      protected final TimeLogger monitor
  • Constructor Details

    • BaseCommand

      public BaseCommand()
  • Method Details

    • runsWhenDisabled

      public boolean runsWhenDisabled()
      Overrides:
      runsWhenDisabled in class org.wpilib.command2.Command
    • setRunsWhenDisabled

      public void setRunsWhenDisabled(boolean value)
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in interface TunablePrefixProvider
    • initialize

      public void initialize()
      Overrides:
      initialize in class org.wpilib.command2.Command
    • end

      public void end(boolean isInterrupted)
      Overrides:
      end in class org.wpilib.command2.Command
    • close

      public void close()
      Releases the native alert allocation when this command will no longer be used.
      Specified by:
      close in interface AutoCloseable
    • publishToTunables

      public void publishToTunables()
    • publishToTunables

      public void publishToTunables(String label)