Table of Contents

Class Pigeon2Configuration

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

Class description for the Pigeon 2 IMU sensor that measures orientation.

This defines all configurations for the Pigeon2.
public class Pigeon2Configuration : IParentConfiguration, ISerializable, ICloneable
Inheritance
Pigeon2Configuration
Implements
Inherited Members

Fields

CustomParams

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public CustomParamsConfigs CustomParams

Field Value

CustomParamsConfigs

FutureProofConfigs

True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.

This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.

This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
public bool FutureProofConfigs

Field Value

bool

GyroTrim

Configs to trim the Pigeon2's gyroscope.

Pigeon2 allows the user to trim the gyroscope's sensitivity. While this isn't necessary for the Pigeon2, as it comes calibrated out-of-the-box, users can make use of this to make the Pigeon2 even more accurate for their application.

Parameter list:
public GyroTrimConfigs GyroTrim

Field Value

GyroTrimConfigs

MountPose

Configs for Pigeon 2's Mount Pose configuration.

These configs allow the Pigeon2 to be mounted in whatever orientation that's desired and ensure the reported Yaw/Pitch/Roll is from the robot's reference.

Parameter list:
public MountPoseConfigs MountPose

Field Value

MountPoseConfigs

Pigeon2Features

Configs to enable/disable various features of the Pigeon2.

These configs allow the user to enable or disable various aspects of the Pigeon2.

Parameter list:
public Pigeon2FeaturesConfigs Pigeon2Features

Field Value

Pigeon2FeaturesConfigs

Methods

Clone()

Creates a copy of this configuration.

public Pigeon2Configuration Clone()

Returns

Pigeon2Configuration

Deserialize(string)

Take a string and deserialize it to this configuration

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

Returns

StatusCode

Return code of the deserialize method

Serialize()

Get the serialized form of this configuration

public string Serialize()

Returns

string

Serialized form of this config group

ToString()

Provides the string representation of this object

public override string ToString()

Returns

string

WithCustomParams(CustomParamsConfigs)

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

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public Pigeon2Configuration WithCustomParams(CustomParamsConfigs newCustomParams)

Parameters

newCustomParams CustomParamsConfigs

Parameter to modify

Returns

Pigeon2Configuration

Itself

WithGyroTrim(GyroTrimConfigs)

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

Configs to trim the Pigeon2's gyroscope.

Pigeon2 allows the user to trim the gyroscope's sensitivity. While this isn't necessary for the Pigeon2, as it comes calibrated out-of-the-box, users can make use of this to make the Pigeon2 even more accurate for their application.

Parameter list:
public Pigeon2Configuration WithGyroTrim(GyroTrimConfigs newGyroTrim)

Parameters

newGyroTrim GyroTrimConfigs

Parameter to modify

Returns

Pigeon2Configuration

Itself

WithMountPose(MountPoseConfigs)

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

Configs for Pigeon 2's Mount Pose configuration.

These configs allow the Pigeon2 to be mounted in whatever orientation that's desired and ensure the reported Yaw/Pitch/Roll is from the robot's reference.

Parameter list:
public Pigeon2Configuration WithMountPose(MountPoseConfigs newMountPose)

Parameters

newMountPose MountPoseConfigs

Parameter to modify

Returns

Pigeon2Configuration

Itself

WithPigeon2Features(Pigeon2FeaturesConfigs)

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

Configs to enable/disable various features of the Pigeon2.

These configs allow the user to enable or disable various aspects of the Pigeon2.

Parameter list:
public Pigeon2Configuration WithPigeon2Features(Pigeon2FeaturesConfigs newPigeon2Features)

Parameters

newPigeon2Features Pigeon2FeaturesConfigs

Parameter to modify

Returns

Pigeon2Configuration

Itself