Configs that affect how software-limit switches behave.
More...
#include <ctre/phoenix6/configs/Configs.hpp>
|
bool | ForwardSoftLimitEnable = false |
| If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.
|
|
bool | ReverseSoftLimitEnable = false |
| If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.
|
|
units::angle::turn_t | ForwardSoftLimitThreshold = 0_tr |
| Position threshold for forward soft limit features.
|
|
units::angle::turn_t | ReverseSoftLimitThreshold = 0_tr |
| Position threshold for reverse soft limit features.
|
|
Configs that affect how software-limit switches behave.
Includes enabling software-limit switches and the threshold at which they are tripped.
◆ SoftwareLimitSwitchConfigs()
constexpr ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::SoftwareLimitSwitchConfigs |
( |
| ) |
|
|
constexprdefault |
◆ 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()
constexpr SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithForwardSoftLimitEnable |
( |
bool | newForwardSoftLimitEnable | ) |
|
|
inlineconstexpr |
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.
- Parameters
-
newForwardSoftLimitEnable | Parameter to modify |
- Returns
- Itself
◆ WithForwardSoftLimitThreshold()
constexpr SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithForwardSoftLimitThreshold |
( |
units::angle::turn_t | newForwardSoftLimitThreshold | ) |
|
|
inlineconstexpr |
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
-
newForwardSoftLimitThreshold | Parameter to modify |
- Returns
- Itself
◆ WithReverseSoftLimitEnable()
constexpr SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithReverseSoftLimitEnable |
( |
bool | newReverseSoftLimitEnable | ) |
|
|
inlineconstexpr |
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.
- Parameters
-
newReverseSoftLimitEnable | Parameter to modify |
- Returns
- Itself
◆ WithReverseSoftLimitThreshold()
constexpr SoftwareLimitSwitchConfigs & ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::WithReverseSoftLimitThreshold |
( |
units::angle::turn_t | newReverseSoftLimitThreshold | ) |
|
|
inlineconstexpr |
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
-
newReverseSoftLimitThreshold | Parameter to modify |
- Returns
- Itself
◆ 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.
◆ ForwardSoftLimitThreshold
units::angle::turn_t ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ForwardSoftLimitThreshold = 0_tr |
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.
◆ ReverseSoftLimitThreshold
units::angle::turn_t ctre::phoenix6::configs::SoftwareLimitSwitchConfigs::ReverseSoftLimitThreshold = 0_tr |
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: