Class SetTargetCommand<TargetT>
java.lang.Object
org.wpilib.command2.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseSetpointCommand
xbot.common.command.SetTargetCommand<TargetT>
- Type Parameters:
TargetT- The type of the target value.
- All Implemented Interfaces:
AutoCloseable, org.wpilib.telemetry.TelemetryLoggable, org.wpilib.tunable.ComplexTunable, TunablePrefixProvider
A command that sets a target value on a BaseSetpointSubsystem.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.wpilib.command2.Command
org.wpilib.command2.Command.InterruptionBehavior -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BaseSetpointSubsystem<TargetT, ?> protected TargetTFields inherited from class BaseCommand
aKitLog, log, monitor, runningAlert -
Constructor Summary
ConstructorsConstructorDescriptionSetTargetCommand(BaseSetpointSubsystem<TargetT, ?> system) Creates a new SetTargetCommand. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidsetTargetValue(TargetT value) Sets the target value to be applied when the command is initialized.Methods inherited from class BaseCommand
close, end, getPrefix, publishToTunables, publishToTunables, runsWhenDisabled, setRunsWhenDisabledMethods 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, 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
-
targetValue
-
system
-
-
Constructor Details
-
SetTargetCommand
Creates a new SetTargetCommand.- Parameters:
system- The BaseSetpointSubsystem to set the target value on.
-
-
Method Details
-
setTargetValue
Sets the target value to be applied when the command is initialized.- Parameters:
value- The target value to set.
-
initialize
public void initialize()- Overrides:
initializein classBaseCommand
-
isFinished
public boolean isFinished()- Overrides:
isFinishedin classBaseSetpointCommand
-