ConditionalCommand¶
-
class
wpilib.command.
ConditionalCommand
(name, onTrue=None, onFalse=None)[source]¶ Bases:
wpilib.command.Command
A ConditionalCommand is a
Command
that starts one of two commands.A ConditionalCommand uses m_condition to determine whether it should run m_onTrue or m_onFalse.
A ConditionalCommand adds the proper
Command
to theScheduler
duringinitialize()
and thenisFinished()
will return true once thatCommand
has finished executing.If no
Command
is specified for m_onFalse, the occurrence of that condition will be a no-op.Creates a new ConditionalCommand with given name and onTrue and onFalse Commands.
Users of this constructor should also override condition().
Parameters: