Configs that directly affect current limiting features.
More...
#include <ctre/phoenix6/configs/Configs.hpp>
Configs that directly affect current limiting features.
Contains the supply/stator current limit thresholds and whether to enable them or not.
◆ Deserialize()
ctre::phoenix::StatusCode ctre::phoenix6::configs::CurrentLimitsConfigs::Deserialize |
( |
const std::string & |
to_deserialize | ) |
|
|
inlineoverridevirtual |
◆ Serialize()
std::string ctre::phoenix6::configs::CurrentLimitsConfigs::Serialize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ToString()
std::string ctre::phoenix6::configs::CurrentLimitsConfigs::ToString |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ WithStatorCurrentLimit()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithStatorCurrentLimit |
( |
double |
newStatorCurrentLimit | ) |
|
|
inline |
Modifies this configuration's StatorCurrentLimit parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newStatorCurrentLimit | Parameter to modify |
- Returns
- Itself
◆ WithStatorCurrentLimitEnable()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithStatorCurrentLimitEnable |
( |
bool |
newStatorCurrentLimitEnable | ) |
|
|
inline |
Modifies this configuration's StatorCurrentLimitEnable parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newStatorCurrentLimitEnable | Parameter to modify |
- Returns
- Itself
◆ WithSupplyCurrentLimit()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithSupplyCurrentLimit |
( |
double |
newSupplyCurrentLimit | ) |
|
|
inline |
Modifies this configuration's SupplyCurrentLimit parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newSupplyCurrentLimit | Parameter to modify |
- Returns
- Itself
◆ WithSupplyCurrentLimitEnable()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithSupplyCurrentLimitEnable |
( |
bool |
newSupplyCurrentLimitEnable | ) |
|
|
inline |
Modifies this configuration's SupplyCurrentLimitEnable parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newSupplyCurrentLimitEnable | Parameter to modify |
- Returns
- Itself
◆ WithSupplyCurrentThreshold()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithSupplyCurrentThreshold |
( |
double |
newSupplyCurrentThreshold | ) |
|
|
inline |
Modifies this configuration's SupplyCurrentThreshold parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newSupplyCurrentThreshold | Parameter to modify |
- Returns
- Itself
◆ WithSupplyTimeThreshold()
CurrentLimitsConfigs & ctre::phoenix6::configs::CurrentLimitsConfigs::WithSupplyTimeThreshold |
( |
double |
newSupplyTimeThreshold | ) |
|
|
inline |
Modifies this configuration's SupplyTimeThreshold parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newSupplyTimeThreshold | Parameter to modify |
- Returns
- Itself
◆ StatorCurrentLimit
double ctre::phoenix6::configs::CurrentLimitsConfigs::StatorCurrentLimit = 0 |
The amount of current allowed in the motor (motoring and regen current).
This is only applicable for non-torque current control modes. Note this requires the corresponding enable to be true.
Minimum Value: 0.0 Maximum Value: 800.0 Default Value: 0 Units: A
◆ StatorCurrentLimitEnable
bool ctre::phoenix6::configs::CurrentLimitsConfigs::StatorCurrentLimitEnable = false |
Enable motor stator current limiting.
Default Value: False
◆ SupplyCurrentLimit
double ctre::phoenix6::configs::CurrentLimitsConfigs::SupplyCurrentLimit = 0 |
The amount of supply current allowed.
This is only applicable for non-torque current control modes. Note this requires the corresponding enable to be true. Use SupplyCurrentThreshold and SupplyTimeThreshold to allow brief periods of high-current before limiting occurs.
Minimum Value: 0.0 Maximum Value: 800.0 Default Value: 0 Units: A
◆ SupplyCurrentLimitEnable
bool ctre::phoenix6::configs::CurrentLimitsConfigs::SupplyCurrentLimitEnable = false |
Enable motor supply current limiting.
Default Value: False
◆ SupplyCurrentThreshold
double ctre::phoenix6::configs::CurrentLimitsConfigs::SupplyCurrentThreshold = 0 |
Delay supply current limiting until current exceeds this threshold for longer than SupplyTimeThreshold.
This allows current draws above SupplyCurrentLimit for a fixed period of time. This has no effect if SupplyCurrentLimit is greater than this value.
Minimum Value: 0.0 Maximum Value: 511 Default Value: 0 Units: A
◆ SupplyTimeThreshold
double ctre::phoenix6::configs::CurrentLimitsConfigs::SupplyTimeThreshold = 0 |
Allows unlimited current for a period of time before current limiting occurs.
Current threshold is the maximum of SupplyCurrentThreshold and SupplyCurrentLimit.
Minimum Value: 0.0 Maximum Value: 1.275 Default Value: 0 Units: sec
The documentation for this class was generated from the following file: