CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
ctre::phoenix6::signals::MagnetHealthValue Struct Reference

Magnet health as measured by CANcoder. More...

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

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

Public Member Functions

constexpr MagnetHealthValue (int value)
 
constexpr MagnetHealthValue ()
 
constexpr bool operator== (MagnetHealthValue other) const
 
constexpr auto operator<=> (MagnetHealthValue 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 Magnet_Red = 1
 The magnet is too close or too far from the CANcoder.
 
static constexpr int Magnet_Orange = 2
 Magnet health is adequate but with reduced accuracy.
 
static constexpr int Magnet_Green = 3
 Magnet health is ideal.
 
static constexpr int Magnet_Invalid = 0
 The accuracy cannot be determined.
 

Friends

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

Detailed Description

Magnet health as measured by CANcoder.

  Red indicates too close or too far, Orange is adequate but with
  reduced accuracy, green is ideal. Invalid means the accuracy cannot be
  determined.

Constructor & Destructor Documentation

◆ MagnetHealthValue() [1/2]

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

◆ MagnetHealthValue() [2/2]

ctre::phoenix6::signals::MagnetHealthValue::MagnetHealthValue ( )
inlineconstexpr

Member Function Documentation

◆ operator<=>()

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

◆ operator==()

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

◆ Serialize()

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

◆ ToString()

std::string_view ctre::phoenix6::signals::MagnetHealthValue::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,
MagnetHealthValue data )
friend

Member Data Documentation

◆ Magnet_Green

int ctre::phoenix6::signals::MagnetHealthValue::Magnet_Green = 3
staticconstexpr

Magnet health is ideal.

◆ Magnet_Invalid

int ctre::phoenix6::signals::MagnetHealthValue::Magnet_Invalid = 0
staticconstexpr

The accuracy cannot be determined.

◆ Magnet_Orange

int ctre::phoenix6::signals::MagnetHealthValue::Magnet_Orange = 2
staticconstexpr

Magnet health is adequate but with reduced accuracy.

◆ Magnet_Red

int ctre::phoenix6::signals::MagnetHealthValue::Magnet_Red = 1
staticconstexpr

The magnet is too close or too far from the CANcoder.

◆ value

int ctre::phoenix6::signals::MagnetHealthValue::value

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