CTRE Phoenix 6 C++ 24.3.0
ctre::phoenix6::configs::SoftwareLimitSwitchConfigs Class Reference

Configs that affect how software-limit switches behave. More...

#include <ctre/phoenix6/configs/Configs.hpp>

Inheritance diagram for ctre::phoenix6::configs::SoftwareLimitSwitchConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

SoftwareLimitSwitchConfigsWithForwardSoftLimitEnable (bool newForwardSoftLimitEnable)
 Modifies this configuration's ForwardSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
SoftwareLimitSwitchConfigsWithReverseSoftLimitEnable (bool newReverseSoftLimitEnable)
 Modifies this configuration's ReverseSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
SoftwareLimitSwitchConfigsWithForwardSoftLimitThreshold (double newForwardSoftLimitThreshold)
 Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API. More...
 
SoftwareLimitSwitchConfigsWithReverseSoftLimitThreshold (double newReverseSoftLimitThreshold)
 Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API. More...
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
virtual std::string ToString () const =0
 
virtual ctre::phoenix::StatusCode Deserialize (const std::string &string)=0
 
virtual std::string Serialize () const =0
 

Public Attributes

bool ForwardSoftLimitEnable = false
 If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested. More...
 
bool ReverseSoftLimitEnable = false
 If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested. More...
 
double ForwardSoftLimitThreshold = 0
 Position threshold for forward soft limit features. More...
 
double ReverseSoftLimitThreshold = 0
 Position threshold for reverse soft limit features. More...
 

Detailed Description

Configs that affect how software-limit switches behave.

Includes enabling software-limit switches and the threshold at which they are tripped.

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::Deserialize ( const std::string &  to_deserialize)
inlineoverridevirtual

◆ Serialize()

std::string ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ToString ( ) const
inlineoverridevirtual

◆ WithForwardSoftLimitEnable()

SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithForwardSoftLimitEnable ( bool  newForwardSoftLimitEnable)
inline

Modifies this configuration's ForwardSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.

If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.

  • Default Value: False
Parameters
newForwardSoftLimitEnableParameter to modify
Returns
Itself

◆ WithForwardSoftLimitThreshold()

SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithForwardSoftLimitThreshold ( double  newForwardSoftLimitThreshold)
inline

Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.

Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.

  • Minimum Value: -3.4e+38
  • Maximum Value: 3.4e+38
  • Default Value: 0
  • Units: rotations
Parameters
newForwardSoftLimitThresholdParameter to modify
Returns
Itself

◆ WithReverseSoftLimitEnable()

SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithReverseSoftLimitEnable ( bool  newReverseSoftLimitEnable)
inline

Modifies this configuration's ReverseSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.

If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.

  • Default Value: False
Parameters
newReverseSoftLimitEnableParameter to modify
Returns
Itself

◆ WithReverseSoftLimitThreshold()

SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithReverseSoftLimitThreshold ( double  newReverseSoftLimitThreshold)
inline

Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.

Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.

  • Minimum Value: -3.4e+38
  • Maximum Value: 3.4e+38
  • Default Value: 0
  • Units: rotations
Parameters
newReverseSoftLimitThresholdParameter to modify
Returns
Itself

Member Data Documentation

◆ ForwardSoftLimitEnable

bool ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ForwardSoftLimitEnable = false

If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.

  • Default Value: False

◆ ForwardSoftLimitThreshold

double ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ForwardSoftLimitThreshold = 0

Position threshold for forward soft limit features.

ForwardSoftLimitEnable must be enabled for this to take effect.

  • Minimum Value: -3.4e+38
  • Maximum Value: 3.4e+38
  • Default Value: 0
  • Units: rotations

◆ ReverseSoftLimitEnable

bool ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ReverseSoftLimitEnable = false

If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.

  • Default Value: False

◆ ReverseSoftLimitThreshold

double ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ReverseSoftLimitThreshold = 0

Position threshold for reverse soft limit features.

ReverseSoftLimitEnable must be enabled for this to take effect.

  • Minimum Value: -3.4e+38
  • Maximum Value: 3.4e+38
  • Default Value: 0
  • Units: rotations

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