Class TunableWaitCommand

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.WaitCommand
com.stuypulse.robot.commands.compound.TunableWaitCommand
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class TunableWaitCommand extends edu.wpi.first.wpilibj2.command.WaitCommand
A command that does nothing but takes a specified amount of time to finish based on a tunable value.
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command

    edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final edu.wpi.first.networktables.DoubleSubscriber
     
    private static final double
     

    Fields inherited from class edu.wpi.first.wpilibj2.command.WaitCommand

    m_timer
  • Constructor Summary

    Constructors
    Constructor
    Description
    TunableWaitCommand(edu.wpi.first.networktables.DoubleSubscriber tunable)
    Creates a tunable wait command based on a DogLog tunable's DoubleSubscriber
    Creates a tunable wait command by creating a tunable at the path specified Initializes the tunable to a default value of 0.0
    TunableWaitCommand(String tunableName, double defaultValue)
    Creates a tunable wait command by creating a tunable at the path specified
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initSendable(edu.wpi.first.util.sendable.SendableBuilder builder)
     
    boolean
     
    private static @NonNull String
     

    Methods inherited from class edu.wpi.first.wpilibj2.command.WaitCommand

    end, initialize, runsWhenDisabled

    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, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • TunableWaitCommand

      public TunableWaitCommand(edu.wpi.first.networktables.DoubleSubscriber tunable)
      Creates a tunable wait command based on a DogLog tunable's DoubleSubscriber
      Parameters:
      tunable - The DoubleSubscriber instance returned by creation of a DogLog.tunable(String, double)
    • TunableWaitCommand

      public TunableWaitCommand(String tunableName)
      Creates a tunable wait command by creating a tunable at the path specified Initializes the tunable to a default value of 0.0
      Parameters:
      tunableName - path and name of the DogLog.tunable(String, double) created
    • TunableWaitCommand

      public TunableWaitCommand(String tunableName, double defaultValue)
      Creates a tunable wait command by creating a tunable at the path specified
      Parameters:
      tunableName - path and name of the DogLog.tunable(String, double) created
      defaultValue - value the tunable will be initialized to
  • Method Details

    • makeTunableName

      private static @NonNull String makeTunableName(String rawName)
    • isFinished

      public boolean isFinished()
      Overrides:
      isFinished in class edu.wpi.first.wpilibj2.command.WaitCommand
    • initSendable

      public void initSendable(edu.wpi.first.util.sendable.SendableBuilder builder)
      Specified by:
      initSendable in interface edu.wpi.first.util.sendable.Sendable
      Overrides:
      initSendable in class edu.wpi.first.wpilibj2.command.WaitCommand