CTRE_Phoenix 5.20.2
ctre::phoenix::sensors::PigeonIMU::GeneralStatus Struct Reference

#include <PigeonIMU.h>

Public Attributes

PigeonIMU::PigeonState state
 
PigeonIMU::CalibrationMode currentMode
 
int calibrationError
 
bool bCalIsBooting
 
std::string description
 
double tempC
 
int upTimeSec
 
int noMotionBiasCount
 
int tempCompensationCount
 
int lastError
 

Detailed Description

Data object for status on current calibration and general status.

Pigeon has many calibration modes supported for a variety of uses. The modes generally collects and saves persistently information that makes the Pigeon signals more accurate. This includes collecting temperature, gyro, accelerometer, and compass information.

For FRC use-cases, typically compass and temperature calibration is not required.

Additionally when motion driver software in the Pigeon boots, it will perform a fast boot calibration to initially bias gyro and setup accelerometer.

These modes can be enabled with the EnterCalibration mode.

When a calibration mode is entered, caller can expect...

  • PigeonState to reset to Initializing and bCalIsBooting is set to true. Pigeon LEDs will blink the boot pattern. This is similar to the normal boot cal, however it can an additional ~30 seconds since calibration generally requires more information. currentMode will reflect the user's selected calibration mode.
  • PigeonState will eventually settle to UserCalibration and Pigeon LEDs will show cal specific blink patterns. bCalIsBooting is now false.
  • Follow the instructions in the Pigeon User Manual to meet the calibration specific requirements. When finished calibrationError will update with the result. Pigeon will solid-fill LEDs with red (for failure) or green (for success) for ~5 seconds. Pigeon then perform boot-cal to cleanly apply the newly saved calibration data.

Member Data Documentation

◆ bCalIsBooting

bool ctre::phoenix::sensors::PigeonIMU::GeneralStatus::bCalIsBooting

After caller requests a calibration mode, pigeon will perform a boot-cal before entering the requested mode. During this period, this flag is set to true.

◆ calibrationError

int ctre::phoenix::sensors::PigeonIMU::GeneralStatus::calibrationError

The error code for the last calibration mode. Zero represents a successful cal (with solid green LEDs at end of cal) and nonzero is a failed calibration (with solid red LEDs at end of cal). Different calibration

◆ currentMode

PigeonIMU::CalibrationMode ctre::phoenix::sensors::PigeonIMU::GeneralStatus::currentMode

The currently applied calibration mode if state is in UserCalibration or if bCalIsBooting is true. Otherwise it holds the last selected calibration mode (when calibrationError was updated).

◆ description

std::string ctre::phoenix::sensors::PigeonIMU::GeneralStatus::description

general string description of current status

◆ lastError

int ctre::phoenix::sensors::PigeonIMU::GeneralStatus::lastError

Same as GetLastError()

◆ noMotionBiasCount

int ctre::phoenix::sensors::PigeonIMU::GeneralStatus::noMotionBiasCount

Number of times the Pigeon has automatically rebiased the gyro. This counter overflows from 15 -> 0 with no cap.

◆ state

PigeonIMU::PigeonState ctre::phoenix::sensors::PigeonIMU::GeneralStatus::state

The current state of the motion driver. This reflects if the sensor signals are accurate. Most calibration modes will force Pigeon to reinit the motion driver.

◆ tempC

double ctre::phoenix::sensors::PigeonIMU::GeneralStatus::tempC

Temperature in Celsius

◆ tempCompensationCount

int ctre::phoenix::sensors::PigeonIMU::GeneralStatus::tempCompensationCount

Number of times the Pigeon has temperature compensated the various signals. This counter overflows from 15 -> 0 with no cap.

◆ upTimeSec

int ctre::phoenix::sensors::PigeonIMU::GeneralStatus::upTimeSec

Number of seconds Pigeon has been up (since boot). This register is reset on power boot or processor reset. Register is capped at 255 seconds with no wrap around.


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