CTRE Phoenix 6 C++ 26.3.0
Loading...
Searching...
No Matches
ctre::phoenix6::signals::ForwardLimitSourceValue Struct Reference

Determines where to poll the forward limit switch. More...

#include <ctre/phoenix6/signals/SpnEnums.hpp>

Inheritance diagram for ctre::phoenix6::signals::ForwardLimitSourceValue:
ctre::phoenix6::ISerializable

Public Member Functions

constexpr ForwardLimitSourceValue (int value)
 
constexpr ForwardLimitSourceValue ()
 
constexpr bool operator== (ForwardLimitSourceValue other) const
 
constexpr auto operator<=> (ForwardLimitSourceValue other) const
 
constexpr std::string_view ToString () const
 Gets the string representation of this enum.
 
std::string Serialize () const override
 
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

int value
 

Static Public Attributes

static constexpr int LimitSwitchPin = 0
 Use the forward limit switch pin on the limit switch connector.
 
static constexpr int RemoteTalonFX = 1
 Use the forward limit switch attached to another Talon FX on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int RemoteCANifier = 2
 Use the forward limit switch attached to another CANifier on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int RemoteCANcoder = 4
 Use another CANcoder on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int RemoteCANrange = 6
 Use another CANrange on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int RemoteCANdiS1 = 7
 Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int RemoteCANdiS2 = 8
 Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
 
static constexpr int Disabled = 3
 Disable the forward limit switch.
 

Friends

CTREXPORT friend std::ostream & operator<< (std::ostream &os, ForwardLimitSourceValue data)
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ ForwardLimitSourceValue() [1/2]

ctre::phoenix6::signals::ForwardLimitSourceValue::ForwardLimitSourceValue ( int value)
inlineconstexpr

◆ ForwardLimitSourceValue() [2/2]

ctre::phoenix6::signals::ForwardLimitSourceValue::ForwardLimitSourceValue ( )
inlineconstexpr

Member Function Documentation

◆ operator<=>()

auto ctre::phoenix6::signals::ForwardLimitSourceValue::operator<=> ( ForwardLimitSourceValue other) const
inlineconstexpr

◆ operator==()

bool ctre::phoenix6::signals::ForwardLimitSourceValue::operator== ( ForwardLimitSourceValue other) const
inlineconstexpr

◆ Serialize()

std::string ctre::phoenix6::signals::ForwardLimitSourceValue::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string_view ctre::phoenix6::signals::ForwardLimitSourceValue::ToString ( ) const
inlineconstexpr

Gets the string representation of this enum.

Returns
String representation of this enum

Friends And Related Symbol Documentation

◆ operator<<

CTREXPORT friend std::ostream & operator<< ( std::ostream & os,
ForwardLimitSourceValue data )
friend

Member Data Documentation

◆ Disabled

int ctre::phoenix6::signals::ForwardLimitSourceValue::Disabled = 3
staticconstexpr

Disable the forward limit switch.

◆ LimitSwitchPin

int ctre::phoenix6::signals::ForwardLimitSourceValue::LimitSwitchPin = 0
staticconstexpr

Use the forward limit switch pin on the limit switch connector.

◆ RemoteCANcoder

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteCANcoder = 4
staticconstexpr

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).

◆ RemoteCANdiS1

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteCANdiS1 = 7
staticconstexpr

Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).

The forward limit will assert when the CTR Electronics' CANdi™ Signal 1 Input (S1IN) pin matches the configured closed state.

◆ RemoteCANdiS2

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteCANdiS2 = 8
staticconstexpr

Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).

The forward limit will assert when the CTR Electronics' CANdi™ Signal 2 Input (S2IN) pin matches the configured closed state.

◆ RemoteCANifier

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteCANifier = 2
staticconstexpr

Use the forward limit switch attached to another CANifier on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).

◆ RemoteCANrange

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteCANrange = 6
staticconstexpr

Use another CANrange on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).

The forward limit will assert when the CANrange proximity detect is tripped.

◆ RemoteTalonFX

int ctre::phoenix6::signals::ForwardLimitSourceValue::RemoteTalonFX = 1
staticconstexpr

Use the forward limit switch attached to another Talon FX on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).

◆ value

int ctre::phoenix6::signals::ForwardLimitSourceValue::value

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