CTRE Phoenix 6 C++ 24.3.0
|
Configs that change how the motor controller behaves under different limit switch states. More...
#include <ctre/phoenix6/configs/Configs.hpp>
Public Member Functions | |
HardwareLimitSwitchConfigs & | WithForwardLimitType (signals::ForwardLimitTypeValue newForwardLimitType) |
Modifies this configuration's ForwardLimitType parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitAutosetPositionEnable (bool newForwardLimitAutosetPositionEnable) |
Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitAutosetPositionValue (double newForwardLimitAutosetPositionValue) |
Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitEnable (bool newForwardLimitEnable) |
Modifies this configuration's ForwardLimitEnable parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitSource (signals::ForwardLimitSourceValue newForwardLimitSource) |
Modifies this configuration's ForwardLimitSource parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitRemoteSensorID (int newForwardLimitRemoteSensorID) |
Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitType (signals::ReverseLimitTypeValue newReverseLimitType) |
Modifies this configuration's ReverseLimitType parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitAutosetPositionEnable (bool newReverseLimitAutosetPositionEnable) |
Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitAutosetPositionValue (double newReverseLimitAutosetPositionValue) |
Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitEnable (bool newReverseLimitEnable) |
Modifies this configuration's ReverseLimitEnable parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitSource (signals::ReverseLimitSourceValue newReverseLimitSource) |
Modifies this configuration's ReverseLimitSource parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitRemoteSensorID (int newReverseLimitRemoteSensorID) |
Modifies this configuration's ReverseLimitRemoteSensorID parameter and returns itself for method-chaining and easier to use config API. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitRemoteTalonFX (const hardware::core::CoreTalonFX &device) |
Helper method to configure this feedback group to use RemoteTalonFX forward limit switch by passing in the TalonFX object. More... | |
HardwareLimitSwitchConfigs & | WithForwardLimitRemoteCANcoder (const hardware::core::CoreCANcoder &device) |
Helper method to configure this feedback group to use RemoteCANcoder forward limit switch by passing in the CANcoder object. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitRemoteTalonFX (const hardware::core::CoreTalonFX &device) |
Helper method to configure this feedback group to use RemoteTalonFX reverse limit switch by passing in the TalonFX object. More... | |
HardwareLimitSwitchConfigs & | WithReverseLimitRemoteCANcoder (const hardware::core::CoreCANcoder &device) |
Helper method to configure this feedback group to use RemoteCANcoder reverse limit switch by passing in the CANcoder object. 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 the forward limit switch is normally-open (default) or normally-closed. More... | |
bool | ForwardLimitAutosetPositionEnable = false |
If enabled, the position is automatically set to a specific value, specified by ForwardLimitAutosetPositionValue, when the forward limit switch is asserted. More... | |
double | ForwardLimitAutosetPositionValue = 0 |
The value to automatically set the position to when the forward limit switch is asserted. More... | |
bool | ForwardLimitEnable = true |
If enabled, motor output is set to neutral when the forward limit switch is asserted 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 remote device if using remote limit switch features for the forward limit switch. More... | |
signals::ReverseLimitTypeValue | ReverseLimitType = signals::ReverseLimitTypeValue::NormallyOpen |
Determines if the reverse limit switch is normally-open (default) or normally-closed. More... | |
bool | ReverseLimitAutosetPositionEnable = false |
If enabled, the position is automatically set to a specific value, specified by ReverseLimitAutosetPositionValue, when the reverse limit switch is asserted. More... | |
double | ReverseLimitAutosetPositionValue = 0 |
The value to automatically set the position to when the reverse limit switch is asserted. More... | |
bool | ReverseLimitEnable = true |
If enabled, motor output is set to neutral when reverse limit switch is asseted and negative 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 remote device if using remote limit switch features for the reverse limit switch. More... | |
Configs that change how the motor controller behaves under different limit switch states.
Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlineoverridevirtual |
Implements ctre::phoenix6::ISerializable.
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inline |
Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, the position is automatically set to a specific value, specified by ForwardLimitAutosetPositionValue, when the forward limit switch is asserted.
newForwardLimitAutosetPositionEnable | Parameter to modify |
|
inline |
Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API.
The value to automatically set the position to when the forward limit switch is asserted. This has no effect if ForwardLimitAutosetPositionEnable is false.
newForwardLimitAutosetPositionValue | Parameter to modify |
|
inline |
Modifies this configuration's ForwardLimitEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, motor output is set to neutral when the forward limit switch is asserted and positive output is requested.
newForwardLimitEnable | Parameter to modify |
HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitRemoteCANcoder | ( | const hardware::core::CoreCANcoder & | device | ) |
Helper method to configure this feedback group to use RemoteCANcoder forward limit switch by passing in the CANcoder object.
When using RemoteCANcoder, the Talon FX will use another CANcoder on the same CAN bus. The forward limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
device | CANcoder reference to use for RemoteCANcoder forward limit switch |
|
inline |
Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for method-chaining and easier to use config API.
Device ID of the remote device if using remote limit switch features for the forward limit switch.
newForwardLimitRemoteSensorID | Parameter to modify |
HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithForwardLimitRemoteTalonFX | ( | const hardware::core::CoreTalonFX & | device | ) |
Helper method to configure this feedback group to use RemoteTalonFX forward limit switch by passing in the TalonFX object.
When using RemoteTalonFX, the Talon FX will use the forward limit switch attached to another Talon FX on the same CAN bus.
device | TalonFX reference to use for RemoteTalonFX forward limit switch |
|
inline |
Modifies this configuration's ForwardLimitSource parameter and returns itself for method-chaining and easier to use config API.
Determines where to poll the forward limit switch. This defaults to the forward limit switch pin on the limit switch connector.
Choose RemoteTalonFX to use the forward limit switch attached to another Talon FX on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Choose RemoteCANifier to use the forward limit switch attached to another CANifier on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID). The forward limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
newForwardLimitSource | Parameter to modify |
|
inline |
Modifies this configuration's ForwardLimitType parameter and returns itself for method-chaining and easier to use config API.
Determines if the forward limit switch is normally-open (default) or normally-closed.
newForwardLimitType | Parameter to modify |
|
inline |
Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, the position is automatically set to a specific value, specified by ReverseLimitAutosetPositionValue, when the reverse limit switch is asserted.
newReverseLimitAutosetPositionEnable | Parameter to modify |
|
inline |
Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for method-chaining and easier to use config API.
The value to automatically set the position to when the reverse limit switch is asserted. This has no effect if ReverseLimitAutosetPositionEnable is false.
newReverseLimitAutosetPositionValue | Parameter to modify |
|
inline |
Modifies this configuration's ReverseLimitEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, motor output is set to neutral when reverse limit switch is asseted and negative output is requested.
newReverseLimitEnable | Parameter to modify |
HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitRemoteCANcoder | ( | const hardware::core::CoreCANcoder & | device | ) |
Helper method to configure this feedback group to use RemoteCANcoder reverse limit switch by passing in the CANcoder object.
When using RemoteCANcoder, the Talon FX will use another CANcoder on the same CAN bus. The reverse limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
device | CANcoder reference to use for RemoteCANcoder reverse limit switch |
|
inline |
Modifies this configuration's ReverseLimitRemoteSensorID parameter and returns itself for method-chaining and easier to use config API.
Device ID of the remote device if using remote limit switch features for the reverse limit switch.
newReverseLimitRemoteSensorID | Parameter to modify |
HardwareLimitSwitchConfigs & ctre::phoenix6::configs::HardwareLimitSwitchConfigs::WithReverseLimitRemoteTalonFX | ( | const hardware::core::CoreTalonFX & | device | ) |
Helper method to configure this feedback group to use RemoteTalonFX reverse limit switch by passing in the TalonFX object.
When using RemoteTalonFX, the Talon FX will use the reverse limit switch attached to another Talon FX on the same CAN bus.
device | TalonFX reference to use for RemoteTalonFX reverse limit switch |
|
inline |
Modifies this configuration's ReverseLimitSource parameter and returns itself for method-chaining and easier to use config API.
Determines where to poll the reverse limit switch. This defaults to the reverse limit switch pin on the limit switch connector.
Choose RemoteTalonFX to use the reverse limit switch attached to another Talon FX on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Choose RemoteCANifier to use the reverse limit switch attached to another CANifier on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID). The reverse limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
newReverseLimitSource | Parameter to modify |
|
inline |
Modifies this configuration's ReverseLimitType parameter and returns itself for method-chaining and easier to use config API.
Determines if the reverse limit switch is normally-open (default) or normally-closed.
newReverseLimitType | Parameter to modify |
bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitAutosetPositionEnable = false |
If enabled, the position is automatically set to a specific value, specified by ForwardLimitAutosetPositionValue, when the forward limit switch is asserted.
double ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitAutosetPositionValue = 0 |
The value to automatically set the position to when the forward limit switch is asserted.
This has no effect if ForwardLimitAutosetPositionEnable is false.
bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitEnable = true |
If enabled, motor output is set to neutral when the forward limit switch is asserted and positive output is requested.
int ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitRemoteSensorID = 0 |
Device ID of the remote device if using remote limit switch features for the forward limit switch.
signals::ForwardLimitSourceValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitSource = signals::ForwardLimitSourceValue::LimitSwitchPin |
Determines where to poll the forward limit switch.
This defaults to the forward limit switch pin on the limit switch connector.
Choose RemoteTalonFX to use the forward limit switch attached to another Talon FX on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Choose RemoteCANifier to use the forward limit switch attached to another CANifier on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID). The forward limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
signals::ForwardLimitTypeValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ForwardLimitType = signals::ForwardLimitTypeValue::NormallyOpen |
Determines if the forward limit switch is normally-open (default) or normally-closed.
bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitAutosetPositionEnable = false |
If enabled, the position is automatically set to a specific value, specified by ReverseLimitAutosetPositionValue, when the reverse limit switch is asserted.
double ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitAutosetPositionValue = 0 |
The value to automatically set the position to when the reverse limit switch is asserted.
This has no effect if ReverseLimitAutosetPositionEnable is false.
bool ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitEnable = true |
If enabled, motor output is set to neutral when reverse limit switch is asseted and negative output is requested.
int ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitRemoteSensorID = 0 |
Device ID of the remote device if using remote limit switch features for the reverse limit switch.
signals::ReverseLimitSourceValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitSource = signals::ReverseLimitSourceValue::LimitSwitchPin |
Determines where to poll the reverse limit switch.
This defaults to the reverse limit switch pin on the limit switch connector.
Choose RemoteTalonFX to use the reverse limit switch attached to another Talon FX on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Choose RemoteCANifier to use the reverse limit switch attached to another CANifier on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID). The reverse limit will assert when the CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange) or GOOD (green).
signals::ReverseLimitTypeValue ctre::phoenix6::configs::HardwareLimitSwitchConfigs::ReverseLimitType = signals::ReverseLimitTypeValue::NormallyOpen |
Determines if the reverse limit switch is normally-open (default) or normally-closed.