WPILibC++ 2024.3.2
frc2::WaitUntilCommand Class Reference

A command that does nothing but ends after a specified match time or condition. More...

#include <frc2/command/WaitUntilCommand.h>

Inheritance diagram for frc2::WaitUntilCommand:
frc2::CommandHelper< Command, WaitUntilCommand >

Public Member Functions

 WaitUntilCommand (std::function< bool()> condition)
 Creates a new WaitUntilCommand that ends after a given condition becomes true. More...
 
 WaitUntilCommand (units::second_t time)
 Creates a new WaitUntilCommand that ends after a given match time. More...
 
 WaitUntilCommand (WaitUntilCommand &&other)=default
 
 WaitUntilCommand (const WaitUntilCommand &other)=default
 
bool IsFinished () override
 
bool RunsWhenDisabled () const override
 
- Public Member Functions inherited from frc2::CommandHelper< Command, WaitUntilCommand >
 CommandHelper ()=default
 
CommandPtr ToPtr () &&override
 

Additional Inherited Members

- Protected Member Functions inherited from frc2::CommandHelper< Command, WaitUntilCommand >
std::unique_ptr< CommandTransferOwnership () &&override
 

Detailed Description

A command that does nothing but ends after a specified match time or condition.

Useful for CommandGroups.

This class is provided by the NewCommands VendorDep

Constructor & Destructor Documentation

◆ WaitUntilCommand() [1/4]

frc2::WaitUntilCommand::WaitUntilCommand ( std::function< bool()>  condition)
explicit

Creates a new WaitUntilCommand that ends after a given condition becomes true.

Parameters
conditionthe condition to determine when to end

◆ WaitUntilCommand() [2/4]

frc2::WaitUntilCommand::WaitUntilCommand ( units::second_t  time)
explicit

Creates a new WaitUntilCommand that ends after a given match time.

NOTE: The match timer used for this command is UNOFFICIAL. Using this command does NOT guarantee that the time at which the action is performed will be judged to be legal by the referees. When in doubt, add a safety factor or time the action manually.

Parameters
timethe match time after which to end, in seconds

◆ WaitUntilCommand() [3/4]

frc2::WaitUntilCommand::WaitUntilCommand ( WaitUntilCommand &&  other)
default

◆ WaitUntilCommand() [4/4]

frc2::WaitUntilCommand::WaitUntilCommand ( const WaitUntilCommand other)
default

Member Function Documentation

◆ IsFinished()

bool frc2::WaitUntilCommand::IsFinished ( )
override

◆ RunsWhenDisabled()

bool frc2::WaitUntilCommand::RunsWhenDisabled ( ) const
override

The documentation for this class was generated from the following file: