CTRE Phoenix C++ 5.33.1
ctre::phoenix::sensors Namespace Reference

sensors namespace More...

Classes

class  AbsoluteSensorRangeRoutines
 Class to handle routines specific to AbsoluteSensorRange. More...
 
class  BasePigeon
 Pigeon IMU Class. More...
 
struct  BasePigeonConfiguration
 Configurables available to Pigeon. More...
 
struct  BasePigeonConfigUtils
 Util class to help with Pigeon configurations. More...
 
class  BasePigeonSimCollection
 Collection of simulation functions available to a Pigeon IMU. More...
 
class  CANCoder
 CTRE CANCoder. More...
 
struct  CANCoderConfiguration
 Configurables available to CANCoder. More...
 
struct  CANCoderConfigUtils
 Util class to help with configuring CANCoder. More...
 
struct  CANCoderFaults
 Faults available to CANCoderFaults. More...
 
class  CANCoderSimCollection
 Collection of simulation functions available to a CANCoder. More...
 
struct  CANCoderStickyFaults
 Sticky Faults for CANCoder (Currently has none) More...
 
class  Pigeon2
 Pigeon 2 Class. More...
 
struct  Pigeon2_Faults
 Sticky faults available to Pigeon. More...
 
struct  Pigeon2_StickyFaults
 Sticky faults available to Pigeon. More...
 
struct  Pigeon2Configuration
 Configurables available to Pigeon. More...
 
struct  Pigeon2ConfigUtils
 Util class to help with Pigeon configurations. More...
 
class  PigeonIMU
 Pigeon IMU Class. More...
 
struct  PigeonIMU_Faults
 Sticky faults available to Pigeon. More...
 
struct  PigeonIMU_StickyFaults
 Sticky faults available to Pigeon. More...
 
struct  PigeonIMUConfiguration
 Configurables available to Pigeon. More...
 
struct  PigeonIMUConfigUtils
 Util class to help with Pigeon configurations. More...
 
class  SensorInitializationStrategyRoutines
 Class to handle routines specific to VelocityMeasPeriod. More...
 
class  SensorTimeBaseRoutines
 Class to handle routines specific to SensorTimeBase. More...
 
class  SensorVelocityMeasPeriodRoutines
 Class to handle routines specific to VelocityMeasPeriod. More...
 
class  WPI_CANCoder
 CTRE CANCoder. More...
 
class  WPI_Pigeon2
 Pigeon 2 Class. More...
 
class  WPI_PigeonIMU
 

Enumerations

enum  AbsoluteSensorRange { Unsigned_0_to_360 = 0 , Signed_PlusMinus180 = 1 }
 Enum for how to range the absolute sensor position. More...
 
enum  SensorTimeBase { Per100Ms_Legacy = 0 , PerSecond = 1 , PerMinute = 2 }
 Velocity Measurement Periods. More...
 
enum  MagnetFieldStrength { Invalid_Unknown = 0 , BadRange_RedLED = 1 , Adequate_OrangeLED = 2 , Good_GreenLED = 3 }
 Indicates the magnet field strength of a magnet-based sensor. More...
 
enum  PigeonIMU_ControlFrame { PigeonIMU_CondStatus_Control_1 = 0x00042800 }
 Enumerated type for status frame types. More...
 
enum  PigeonIMU_StatusFrame {
  PigeonIMU_CondStatus_1_General = 0x042000 , PigeonIMU_CondStatus_9_SixDeg_YPR = 0x042200 , PigeonIMU_CondStatus_6_SensorFusion = 0x042140 , PigeonIMU_CondStatus_11_GyroAccum = 0x042280 ,
  PigeonIMU_CondStatus_2_GeneralCompass = 0x042040 , PigeonIMU_CondStatus_3_GeneralAccel = 0x042080 , PigeonIMU_CondStatus_10_SixDeg_Quat = 0x042240 , PigeonIMU_RawStatus_4_Mag = 0x041CC0 ,
  PigeonIMU_BiasedStatus_2_Gyro = 0x041C40 , PigeonIMU_BiasedStatus_4_Mag = 0x041CC0 , PigeonIMU_BiasedStatus_6_Accel = 0x41D40
}
 Enumerated type for status frame types. More...
 
enum  SensorInitializationStrategy { BootToZero = 0 , BootToAbsolutePosition = 1 }
 Enum for how CANCoder should initialize its position register on boot. More...
 
enum  CANCoderStatusFrame { CANCoderStatusFrame_SensorData = 0x041400 , CANCoderStatusFrame_VbatAndFaults = 0x041440 }
 Enumerated type for status frame types. More...
 
enum  SensorVelocityMeasPeriod {
  Period_1Ms = 1 , Period_2Ms = 2 , Period_5Ms = 5 , Period_10Ms = 10 ,
  Period_20Ms = 20 , Period_25Ms = 25 , Period_50Ms = 50 , Period_100Ms = 100
}
 Enumerate filter periods for any sensor that measures velocity. More...
 
enum class  AxisDirection {
  PositiveZ , PositiveY , PositiveX , NegativeZ ,
  NegativeY , NegativeX
}
 Enumerations for what primary axis to talk about Positive indicates in n the direction, negative indicates in the opposite direction. More...
 

Detailed Description

sensors namespace

Enumeration Type Documentation

◆ AbsoluteSensorRange

Enum for how to range the absolute sensor position.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
Unsigned_0_to_360 

Express the absolute position as an unsigned value.

E.g. [0,+1) rotations or [0,360) deg.

Signed_PlusMinus180 

Express the absolute position as an signed value.

E.g. [-0.5,+0.5) rotations or [-180,+180) deg.

◆ AxisDirection

Enumerations for what primary axis to talk about Positive indicates in n the direction, negative indicates in the opposite direction.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
PositiveZ 
PositiveY 
PositiveX 
NegativeZ 
NegativeY 
NegativeX 

◆ CANCoderStatusFrame

Enumerated type for status frame types.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
CANCoderStatusFrame_SensorData 
CANCoderStatusFrame_VbatAndFaults 

◆ MagnetFieldStrength

Indicates the magnet field strength of a magnet-based sensor.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
Invalid_Unknown 

Magnet Field strength cannot be determined.

BadRange_RedLED 

Magnet field is far too low (too far) or far too high (too close).

Adequate_OrangeLED 

Magnet field is adequate, sensor can be used in this range with slightly reduced accuracy.

Good_GreenLED 

Magnet field is ideal.

◆ PigeonIMU_ControlFrame

Enumerated type for status frame types.

Enumerator
PigeonIMU_CondStatus_Control_1 

◆ PigeonIMU_StatusFrame

Enumerated type for status frame types.

Enumerator
PigeonIMU_CondStatus_1_General 
PigeonIMU_CondStatus_9_SixDeg_YPR 
PigeonIMU_CondStatus_6_SensorFusion 
PigeonIMU_CondStatus_11_GyroAccum 
PigeonIMU_CondStatus_2_GeneralCompass 
PigeonIMU_CondStatus_3_GeneralAccel 
PigeonIMU_CondStatus_10_SixDeg_Quat 
PigeonIMU_RawStatus_4_Mag 
PigeonIMU_BiasedStatus_2_Gyro 
PigeonIMU_BiasedStatus_4_Mag 
PigeonIMU_BiasedStatus_6_Accel 

◆ SensorInitializationStrategy

Enum for how CANCoder should initialize its position register on boot.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
BootToZero 

On boot up, set position to zero.

BootToAbsolutePosition 

On boot up, sync to the Absolute Position signal.

The Absolute position signal will be signed according to the selected Absolute Sensor Range.

◆ SensorTimeBase

Velocity Measurement Periods.

Deprecated:
This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Enumerator
Per100Ms_Legacy 

Legacy Mode.

PerSecond 

Per-Second Velocities.

PerMinute 

Per-Minute Velocities.

◆ SensorVelocityMeasPeriod

Enumerate filter periods for any sensor that measures velocity.

Enumerator
Period_1Ms 

1ms velocity measurement period

Period_2Ms 

2ms velocity measurement period

Period_5Ms 

5ms velocity measurement period

Period_10Ms 

10ms velocity measurement period

Period_20Ms 

20ms velocity measurement period

Period_25Ms 

25ms velocity measurement period

Period_50Ms 

50ms velocity measurement period

Period_100Ms 

100ms velocity measurement period