CTRE Phoenix 6 C++ 24.50.0-alpha-2
ctre::phoenix6::swerve::requests::PointWheelsAt Class Reference

Sets the swerve drive modules to point to a specified direction. More...

#include <ctre/phoenix6/swerve/SwerveRequest.hpp>

Inheritance diagram for ctre::phoenix6::swerve::requests::PointWheelsAt:
ctre::phoenix6::swerve::requests::SwerveRequest

Public Member Functions

ctre::phoenix::StatusCode Apply (SwerveRequest::ControlParameters const &parameters, std::vector< std::unique_ptr< impl::SwerveModuleImpl > > const &modulesToApply) override
 Applies this swerve request to the given modules. More...
 
PointWheelsAtWithModuleDirection (Rotation2d moduleDirection)
 Sets the direction to point the modules toward. More...
 
PointWheelsAtWithDriveRequestType (impl::SwerveModuleImpl::DriveRequestType driveRequestType)
 Sets the type of control request to use for the drive motor. More...
 
PointWheelsAtWithSteerRequestType (impl::SwerveModuleImpl::SteerRequestType steerRequestType)
 Sets the type of control request to use for the steer motor. More...
 
- Public Member Functions inherited from ctre::phoenix6::swerve::requests::SwerveRequest
virtual ~SwerveRequest ()=default
 
virtual ctre::phoenix::StatusCode Apply (ControlParameters const &parameters, std::vector< std::unique_ptr< impl::SwerveModuleImpl > > const &modulesToApply)=0
 Applies this swerve request to the given modules. More...
 

Public Attributes

Rotation2d ModuleDirection {}
 The direction to point the modules toward. More...
 
impl::SwerveModuleImpl::DriveRequestType DriveRequestType = impl::SwerveModuleImpl::DriveRequestType::OpenLoopVoltage
 The type of control request to use for the drive motor. More...
 
impl::SwerveModuleImpl::SteerRequestType SteerRequestType = impl::SwerveModuleImpl::SteerRequestType::MotionMagicExpo
 The type of control request to use for the steer motor. More...
 

Additional Inherited Members

- Public Types inherited from ctre::phoenix6::swerve::requests::SwerveRequest
using ControlParameters = impl::SwerveDrivetrainImpl::ControlParameters
 

Detailed Description

Sets the swerve drive modules to point to a specified direction.

Member Function Documentation

◆ Apply()

ctre::phoenix::StatusCode ctre::phoenix6::swerve::requests::PointWheelsAt::Apply ( SwerveRequest::ControlParameters const &  parameters,
std::vector< std::unique_ptr< impl::SwerveModuleImpl > > const &  modulesToApply 
)
inlineoverridevirtual

Applies this swerve request to the given modules.

This is typically called by the SwerveDrivetrain.

Parameters
parametersParameters the control request needs to calculate the module state
modulesToApplyModules to which the control request is applied
Returns
Status code of sending the request

Implements ctre::phoenix6::swerve::requests::SwerveRequest.

◆ WithDriveRequestType()

PointWheelsAt & ctre::phoenix6::swerve::requests::PointWheelsAt::WithDriveRequestType ( impl::SwerveModuleImpl::DriveRequestType  driveRequestType)
inline

Sets the type of control request to use for the drive motor.

Parameters
driveRequestTypeThe type of control request to use for the drive motor
Returns
this request

◆ WithModuleDirection()

PointWheelsAt & ctre::phoenix6::swerve::requests::PointWheelsAt::WithModuleDirection ( Rotation2d  moduleDirection)
inline

Sets the direction to point the modules toward.

This direction is still optimized to what the module was previously at.

Parameters
moduleDirectionDirection to point the modules toward
Returns
this request

◆ WithSteerRequestType()

PointWheelsAt & ctre::phoenix6::swerve::requests::PointWheelsAt::WithSteerRequestType ( impl::SwerveModuleImpl::SteerRequestType  steerRequestType)
inline

Sets the type of control request to use for the steer motor.

Parameters
steerRequestTypeThe type of control request to use for the steer motor
Returns
this request

Member Data Documentation

◆ DriveRequestType

impl::SwerveModuleImpl::DriveRequestType ctre::phoenix6::swerve::requests::PointWheelsAt::DriveRequestType = impl::SwerveModuleImpl::DriveRequestType::OpenLoopVoltage

The type of control request to use for the drive motor.

◆ ModuleDirection

Rotation2d ctre::phoenix6::swerve::requests::PointWheelsAt::ModuleDirection {}

The direction to point the modules toward.

This direction will still be optimized to what the module was previously at.

◆ SteerRequestType

impl::SwerveModuleImpl::SteerRequestType ctre::phoenix6::swerve::requests::PointWheelsAt::SteerRequestType = impl::SwerveModuleImpl::SteerRequestType::MotionMagicExpo

The type of control request to use for the steer motor.


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