CTRE Phoenix 6 C++ 24.2.0
ctre::phoenix6::configs::HardwareLimitSwitchConfigs Class Reference

Configs that change how the motor controller behaves under different limit switch statse. More...

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

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

Public Member Functions

HardwareLimitSwitchConfigsWithForwardLimitType (signals::ForwardLimitTypeValue newForwardLimitType)
 Modifies this configuration's ForwardLimitType parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithForwardLimitAutosetPositionEnable (bool newForwardLimitAutosetPositionEnable)
 Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithForwardLimitAutosetPositionValue (double newForwardLimitAutosetPositionValue)
 Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithForwardLimitEnable (bool newForwardLimitEnable)
 Modifies this configuration's ForwardLimitEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithForwardLimitSource (signals::ForwardLimitSourceValue newForwardLimitSource)
 Modifies this configuration's ForwardLimitSource parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithForwardLimitRemoteSensorID (int newForwardLimitRemoteSensorID)
 Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitType (signals::ReverseLimitTypeValue newReverseLimitType)
 Modifies this configuration's ReverseLimitType parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitAutosetPositionEnable (bool newReverseLimitAutosetPositionEnable)
 Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitAutosetPositionValue (double newReverseLimitAutosetPositionValue)
 Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitEnable (bool newReverseLimitEnable)
 Modifies this configuration's ReverseLimitEnable parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitSource (signals::ReverseLimitSourceValue newReverseLimitSource)
 Modifies this configuration's ReverseLimitSource parameter and returns itself for method-chaining and easier to use config API. More...
 
HardwareLimitSwitchConfigsWithReverseLimitRemoteSensorID (int newReverseLimitRemoteSensorID)
 Modifies this configuration's ReverseLimitRemoteSensorID 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

signals::ForwardLimitTypeValue ForwardLimitType = signals::ForwardLimitTypeValue::NormallyOpen
 Determines if limit is normally-open (default) or normally-closed. More...
 
bool ForwardLimitAutosetPositionEnable = false
 If enabled, the position is auto-set to a specific value, specified by ForwardLimitAutosetPositionValue. More...
 
double ForwardLimitAutosetPositionValue = 0
 The value to auto-set the position to. More...
 
bool ForwardLimitEnable = true
 If enabled, motor output is set to neutral when forward limit switch is asseted and positive output is requested. More...
 
signals::ForwardLimitSourceValue ForwardLimitSource = signals::ForwardLimitSourceValue::LimitSwitchPin
 Determines where to poll the forward limit switch. More...
 
int ForwardLimitRemoteSensorID = 0
 Device ID of the device if using remote limit switch features. More...
 
signals::ReverseLimitTypeValue ReverseLimitType = signals::ReverseLimitTypeValue::NormallyOpen
 Determines if limit is normally-open (default) or normally-closed. More...
 
bool ReverseLimitAutosetPositionEnable = false
 If enabled, the position is auto-set to a specific value, specified by ReverseLimitAutosetPositionValue. More...
 
double ReverseLimitAutosetPositionValue = 0
 The value to auto-set the position to. More...
 
bool ReverseLimitEnable = true
 If enabled, motor output is set to neutral when reverse limit switch is asseted and positive output is requested. More...
 
signals::ReverseLimitSourceValue ReverseLimitSource = signals::ReverseLimitSourceValue::LimitSwitchPin
 Determines where to poll the reverse limit switch. More...
 
int ReverseLimitRemoteSensorID = 0
 Device ID of the device if using remote limit switch features. More...
 

Detailed Description

Configs that change how the motor controller behaves under different limit switch statse.

Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.

Member Function Documentation

◆ Deserialize()

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

◆ Serialize()

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

◆ ToString()

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

◆ WithForwardLimitAutosetPositionEnable()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitAutosetPositionEnable ( bool  newForwardLimitAutosetPositionEnable)
inline

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

Parameters
newForwardLimitAutosetPositionEnableParameter to modify
Returns
Itself

◆ WithForwardLimitAutosetPositionValue()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitAutosetPositionValue ( double  newForwardLimitAutosetPositionValue)
inline

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

Parameters
newForwardLimitAutosetPositionValueParameter to modify
Returns
Itself

◆ WithForwardLimitEnable()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitEnable ( bool  newForwardLimitEnable)
inline

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

Parameters
newForwardLimitEnableParameter to modify
Returns
Itself

◆ WithForwardLimitRemoteSensorID()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitRemoteSensorID ( int  newForwardLimitRemoteSensorID)
inline

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

Parameters
newForwardLimitRemoteSensorIDParameter to modify
Returns
Itself

◆ WithForwardLimitSource()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitSource ( signals::ForwardLimitSourceValue  newForwardLimitSource)
inline

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

Parameters
newForwardLimitSourceParameter to modify
Returns
Itself

◆ WithForwardLimitType()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitType ( signals::ForwardLimitTypeValue  newForwardLimitType)
inline

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

Parameters
newForwardLimitTypeParameter to modify
Returns
Itself

◆ WithReverseLimitAutosetPositionEnable()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitAutosetPositionEnable ( bool  newReverseLimitAutosetPositionEnable)
inline

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

Parameters
newReverseLimitAutosetPositionEnableParameter to modify
Returns
Itself

◆ WithReverseLimitAutosetPositionValue()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitAutosetPositionValue ( double  newReverseLimitAutosetPositionValue)
inline

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

Parameters
newReverseLimitAutosetPositionValueParameter to modify
Returns
Itself

◆ WithReverseLimitEnable()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitEnable ( bool  newReverseLimitEnable)
inline

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

Parameters
newReverseLimitEnableParameter to modify
Returns
Itself

◆ WithReverseLimitRemoteSensorID()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitRemoteSensorID ( int  newReverseLimitRemoteSensorID)
inline

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

Parameters
newReverseLimitRemoteSensorIDParameter to modify
Returns
Itself

◆ WithReverseLimitSource()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitSource ( signals::ReverseLimitSourceValue  newReverseLimitSource)
inline

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

Parameters
newReverseLimitSourceParameter to modify
Returns
Itself

◆ WithReverseLimitType()

HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitType ( signals::ReverseLimitTypeValue  newReverseLimitType)
inline

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

Parameters
newReverseLimitTypeParameter to modify
Returns
Itself

Member Data Documentation

◆ ForwardLimitAutosetPositionEnable

bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitAutosetPositionEnable = false

If enabled, the position is auto-set to a specific value, specified by ForwardLimitAutosetPositionValue.

Default Value: False

◆ ForwardLimitAutosetPositionValue

double ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitAutosetPositionValue = 0

The value to auto-set the position to.

This has no effect if ForwardLimitAutosetPositionEnable is false.

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

◆ ForwardLimitEnable

bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitEnable = true

If enabled, motor output is set to neutral when forward limit switch is asseted and positive output is requested.

Default Value: True

◆ ForwardLimitRemoteSensorID

int ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitRemoteSensorID = 0

Device ID of the device if using remote limit switch features.

Minimum Value: 0 Maximum Value: 62 Default Value: 0 Units:

◆ ForwardLimitSource

signals::ForwardLimitSourceValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitSource = signals::ForwardLimitSourceValue::LimitSwitchPin

Determines where to poll the forward limit switch.

This defaults to the limit switch pin on the limit switch connector.

◆ ForwardLimitType

signals::ForwardLimitTypeValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitType = signals::ForwardLimitTypeValue::NormallyOpen

Determines if limit is normally-open (default) or normally-closed.

◆ ReverseLimitAutosetPositionEnable

bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitAutosetPositionEnable = false

If enabled, the position is auto-set to a specific value, specified by ReverseLimitAutosetPositionValue.

Default Value: False

◆ ReverseLimitAutosetPositionValue

double ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitAutosetPositionValue = 0

The value to auto-set the position to.

This has no effect if ReverseLimitAutosetPositionEnable is false.

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

◆ ReverseLimitEnable

bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitEnable = true

If enabled, motor output is set to neutral when reverse limit switch is asseted and positive output is requested.

Default Value: True

◆ ReverseLimitRemoteSensorID

int ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitRemoteSensorID = 0

Device ID of the device if using remote limit switch features.

Minimum Value: 0 Maximum Value: 62 Default Value: 0 Units:

◆ ReverseLimitSource

signals::ReverseLimitSourceValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitSource = signals::ReverseLimitSourceValue::LimitSwitchPin

Determines where to poll the reverse limit switch.

This defaults to the limit switch pin on the limit switch connector.

◆ ReverseLimitType

signals::ReverseLimitTypeValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitType = signals::ReverseLimitTypeValue::NormallyOpen

Determines if limit is normally-open (default) or normally-closed.


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