CTRE Phoenix 6 C++ 25.2.1
Loading...
Searching...
No Matches
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.
 
SwerveDriveBrakeWithDriveRequestType (impl::DriveRequestType newDriveRequestType) &
 Modifies the DriveRequestType parameter and returns itself.
 
SwerveDriveBrake && WithDriveRequestType (impl::DriveRequestType newDriveRequestType) &&
 Modifies the DriveRequestType parameter and returns itself.
 
SwerveDriveBrakeWithSteerRequestType (impl::SteerRequestType newSteerRequestType) &
 Modifies the SteerRequestType parameter and returns itself.
 
SwerveDriveBrake && WithSteerRequestType (impl::SteerRequestType newSteerRequestType) &&
 Modifies the SteerRequestType parameter and returns itself.
 
- Public Member Functions inherited from ctre::phoenix6::swerve::requests::SwerveRequest
virtual ~SwerveRequest ()=default
 

Public Attributes

impl::DriveRequestType DriveRequestType = impl::DriveRequestType::OpenLoopVoltage
 The type of control request to use for the drive motor.
 
impl::SteerRequestType SteerRequestType = impl::SteerRequestType::Position
 The type of control request to use for the steer motor.
 

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() [1/2]

SwerveDriveBrake & ctre::phoenix6::swerve::requests::SwerveDriveBrake::WithDriveRequestType ( impl::DriveRequestType newDriveRequestType) &
inline

Modifies the DriveRequestType parameter and returns itself.

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

Parameters
newDriveRequestTypeParameter to modify
Returns
this object

◆ WithDriveRequestType() [2/2]

SwerveDriveBrake && ctre::phoenix6::swerve::requests::SwerveDriveBrake::WithDriveRequestType ( impl::DriveRequestType newDriveRequestType) &&
inline

Modifies the DriveRequestType parameter and returns itself.

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

Parameters
newDriveRequestTypeParameter to modify
Returns
this object

◆ WithSteerRequestType() [1/2]

SwerveDriveBrake & ctre::phoenix6::swerve::requests::SwerveDriveBrake::WithSteerRequestType ( impl::SteerRequestType newSteerRequestType) &
inline

Modifies the SteerRequestType parameter and returns itself.

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

Parameters
newSteerRequestTypeParameter to modify
Returns
this object

◆ WithSteerRequestType() [2/2]

SwerveDriveBrake && ctre::phoenix6::swerve::requests::SwerveDriveBrake::WithSteerRequestType ( impl::SteerRequestType newSteerRequestType) &&
inline

Modifies the SteerRequestType parameter and returns itself.

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

Parameters
newSteerRequestTypeParameter to modify
Returns
this object

Member Data Documentation

◆ DriveRequestType

impl::DriveRequestType ctre::phoenix6::swerve::requests::SwerveDriveBrake::DriveRequestType = impl::DriveRequestType::OpenLoopVoltage

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

◆ SteerRequestType

impl::SteerRequestType ctre::phoenix6::swerve::requests::SwerveDriveBrake::SteerRequestType = impl::SteerRequestType::Position

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


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