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

Sets the swerve drive module states to point inward on the robot in an "X" fashion, creating a natural brake which will oppose any motion. More...

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

Inheritance diagram for ctre::phoenix6::swerve::requests::SwerveDriveBrake:
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...
 
SwerveDriveBrakeWithDriveRequestType (impl::SwerveModuleImpl::DriveRequestType driveRequestType)
 Sets the type of control request to use for the drive motor. More...
 
SwerveDriveBrakeWithSteerRequestType (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

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 module states to point inward on the robot in an "X" fashion, creating a natural brake which will oppose any motion.

Member Function Documentation

◆ Apply()

ctre::phoenix::StatusCode ctre::phoenix6::swerve::requests::SwerveDriveBrake::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()

SwerveDriveBrake & ctre::phoenix6::swerve::requests::SwerveDriveBrake::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

◆ WithSteerRequestType()

SwerveDriveBrake & ctre::phoenix6::swerve::requests::SwerveDriveBrake::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::SwerveDriveBrake::DriveRequestType = impl::SwerveModuleImpl::DriveRequestType::OpenLoopVoltage

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

◆ SteerRequestType

impl::SwerveModuleImpl::SteerRequestType ctre::phoenix6::swerve::requests::SwerveDriveBrake::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: