CTRE Phoenix Pro C++ 23.0.12
ctre::phoenixpro::configs::CurrentLimitsConfigs Class Reference

Configs that directly affect current limiting features. More...

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

Inheritance diagram for ctre::phoenixpro::configs::CurrentLimitsConfigs:
ctre::phoenixpro::configs::ParentConfiguration ctre::phoenixpro::ISerializable

Public Member Functions

std::string ToString () const
 
std::string Serialize () const
 
ctre::phoenix::StatusCode Deserialize (const std::string &string)
 
virtual std::string ToString () const =0
 
virtual ctre::phoenix::StatusCode Deserialize (const std::string &string)=0
 
virtual std::string Serialize () const =0
 

Public Attributes

double StatorCurrentLimit = 0
 The amount of current allowed in the motor (motoring and regen current). More...
 
bool StatorCurrentLimitEnable = false
 Enable motor stator current limiting. More...
 
double SupplyCurrentLimit = 0
 The amount of supply current allowed. More...
 
bool SupplyCurrentLimitEnable = false
 Enable motor supply current limiting. More...
 
double SupplyCurrentThreshold = 0
 Delay supply current limiting until current exceeds this threshold for longer than SupplyTimeThreshold. More...
 
double SupplyTimeThreshold = 0
 Allows unlimited current for a period of time before current limiting occurs. More...
 

Detailed Description

Configs that directly affect current limiting features.

Includes Motor Invert and various limit features.

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenixpro::configs::CurrentLimitsConfigs::Deserialize ( const std::string &  string)
inlinevirtual

◆ Serialize()

std::string ctre::phoenixpro::configs::CurrentLimitsConfigs::Serialize ( ) const
inlinevirtual

◆ ToString()

std::string ctre::phoenixpro::configs::CurrentLimitsConfigs::ToString ( ) const
inlinevirtual

Member Data Documentation

◆ StatorCurrentLimit

double ctre::phoenixpro::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::phoenixpro::configs::CurrentLimitsConfigs::StatorCurrentLimitEnable = false

Enable motor stator current limiting.

Default Value: False

◆ SupplyCurrentLimit

double ctre::phoenixpro::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::phoenixpro::configs::CurrentLimitsConfigs::SupplyCurrentLimitEnable = false

Enable motor supply current limiting.

Default Value: False

◆ SupplyCurrentThreshold

double ctre::phoenixpro::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::phoenixpro::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: