WPILibC++ 2023.4.3-108-ge5452e3
frc2::TrapezoidProfileCommand< Distance > Class Template Reference

A command that runs a TrapezoidProfile. More...

#include <frc2/command/TrapezoidProfileCommand.h>

Inheritance diagram for frc2::TrapezoidProfileCommand< Distance >:
frc2::CommandHelper< CommandBase, TrapezoidProfileCommand< Distance > >

Public Member Functions

 TrapezoidProfileCommand (frc::TrapezoidProfile< Distance > profile, std::function< void(State)> output, std::initializer_list< Subsystem * > requirements)
 Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile. More...
 
 TrapezoidProfileCommand (frc::TrapezoidProfile< Distance > profile, std::function< void(State)> output, std::span< Subsystem *const > requirements={})
 Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile. More...
 
void Initialize () override
 
void Execute () override
 
void End (bool interrupted) override
 
bool IsFinished () override
 
- Public Member Functions inherited from frc2::CommandHelper< CommandBase, TrapezoidProfileCommand< Distance > >
 CommandHelper ()=default
 
CommandPtr ToPtr () &&override
 

Additional Inherited Members

- Protected Member Functions inherited from frc2::CommandHelper< CommandBase, TrapezoidProfileCommand< Distance > >
std::unique_ptr< CommandTransferOwnership () &&override
 

Detailed Description

template<class Distance>
class frc2::TrapezoidProfileCommand< Distance >

A command that runs a TrapezoidProfile.

Useful for smoothly controlling mechanism motion.

This class is provided by the NewCommands VendorDep

See also
TrapezoidProfile

Constructor & Destructor Documentation

◆ TrapezoidProfileCommand() [1/2]

template<class Distance >
frc2::TrapezoidProfileCommand< Distance >::TrapezoidProfileCommand ( frc::TrapezoidProfile< Distance >  profile,
std::function< void(State)>  output,
std::initializer_list< Subsystem * >  requirements 
)
inline

Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile.

Output will be piped to the provided consumer function.

Parameters
profileThe motion profile to execute.
outputThe consumer for the profile output.
requirementsThe list of requirements.

◆ TrapezoidProfileCommand() [2/2]

template<class Distance >
frc2::TrapezoidProfileCommand< Distance >::TrapezoidProfileCommand ( frc::TrapezoidProfile< Distance >  profile,
std::function< void(State)>  output,
std::span< Subsystem *const >  requirements = {} 
)
inline

Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile.

Output will be piped to the provided consumer function.

Parameters
profileThe motion profile to execute.
outputThe consumer for the profile output.
requirementsThe list of requirements.

Member Function Documentation

◆ End()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::End ( bool  interrupted)
inlineoverride

◆ Execute()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::Execute ( )
inlineoverride

◆ Initialize()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::Initialize ( )
inlineoverride

◆ IsFinished()

template<class Distance >
bool frc2::TrapezoidProfileCommand< Distance >::IsFinished ( )
inlineoverride

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