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
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
FieldsModifier and TypeFieldDescriptionprivate final edu.wpi.first.networktables.DoubleSubscriberprivate static final doubleFields inherited from class edu.wpi.first.wpilibj2.command.WaitCommand
m_timer -
Constructor Summary
ConstructorsConstructorDescriptionTunableWaitCommand(edu.wpi.first.networktables.DoubleSubscriber tunable) Creates a tunable wait command based on a DogLog tunable's DoubleSubscriberTunableWaitCommand(String tunableName) Creates a tunable wait command by creating a tunable at the path specified Initializes the tunable to a default value of 0.0TunableWaitCommand(String tunableName, double defaultValue) Creates a tunable wait command by creating a tunable at the path specified -
Method Summary
Modifier and TypeMethodDescriptionvoidinitSendable(edu.wpi.first.util.sendable.SendableBuilder builder) booleanprivate static @NonNull StringmakeTunableName(String rawName) Methods inherited from class edu.wpi.first.wpilibj2.command.WaitCommand
end, initialize, runsWhenDisabledMethods 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
-
Field Details
-
tunableDefaultValue
- See Also:
-
tunable
-
-
Constructor Details
-
TunableWaitCommand
Creates a tunable wait command based on a DogLog tunable's DoubleSubscriber- Parameters:
tunable- The DoubleSubscriber instance returned by creation of aDogLog.tunable(String, double)
-
TunableWaitCommand
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 theDogLog.tunable(String, double)created
-
TunableWaitCommand
Creates a tunable wait command by creating a tunable at the path specified- Parameters:
tunableName- path and name of theDogLog.tunable(String, double)createddefaultValue- value the tunable will be initialized to
-
-
Method Details
-
makeTunableName
-
isFinished
- Overrides:
isFinishedin classedu.wpi.first.wpilibj2.command.WaitCommand
-
initSendable
- Specified by:
initSendablein interfaceedu.wpi.first.util.sendable.Sendable- Overrides:
initSendablein classedu.wpi.first.wpilibj2.command.WaitCommand
-