CTRE_Phoenix  5.19.4
com.ctre.phoenix.sensors.PigeonIMU Class Reference

Classes

enum  CalibrationMode
 
class  FusionStatus
 
class  GeneralStatus
 
enum  PigeonState
 

Public Member Functions

 PigeonIMU (int deviceNumber)
 
ErrorCode DestroyObject ()
 
 PigeonIMU (TalonSRX talonSrx)
 
ErrorCode setYaw (double angleDeg, int timeoutMs)
 
ErrorCode setYaw (double angleDeg)
 
ErrorCode addYaw (double angleDeg, int timeoutMs)
 
ErrorCode addYaw (double angleDeg)
 
ErrorCode setYawToCompass (int timeoutMs)
 
ErrorCode setYawToCompass ()
 
ErrorCode setFusedHeading (double angleDeg, int timeoutMs)
 
ErrorCode setFusedHeading (double angleDeg)
 
ErrorCode addFusedHeading (double angleDeg, int timeoutMs)
 
ErrorCode addFusedHeading (double angleDeg)
 
ErrorCode setFusedHeadingToCompass (int timeoutMs)
 
ErrorCode setFusedHeadingToCompass ()
 
ErrorCode setAccumZAngle (double angleDeg, int timeoutMs)
 
ErrorCode setAccumZAngle (double angleDeg)
 
ErrorCode setTemperatureCompensationDisable (boolean bTempCompDisable, int timeoutMs)
 
ErrorCode setTemperatureCompensationDisable (boolean bTempCompDisable)
 
ErrorCode setCompassDeclination (double angleDegOffset, int timeoutMs)
 
ErrorCode setCompassDeclination (double angleDegOffset)
 
ErrorCode setCompassAngle (double angleDeg, int timeoutMs)
 
ErrorCode setCompassAngle (double angleDeg)
 
ErrorCode enterCalibrationMode (CalibrationMode calMode, int timeoutMs)
 
ErrorCode enterCalibrationMode (CalibrationMode calMode)
 
ErrorCode getGeneralStatus (GeneralStatus toFill)
 
ErrorCode getLastError ()
 
ErrorCode get6dQuaternion (double[] wxyz)
 
ErrorCode getYawPitchRoll (double[] ypr_deg)
 
ErrorCode getAccumGyro (double[] xyz_deg)
 
double getAbsoluteCompassHeading ()
 
double getCompassHeading ()
 
double getCompassFieldStrength ()
 
double getTemp ()
 
PigeonState getState ()
 
int getUpTime ()
 
ErrorCode getRawMagnetometer (short[] rm_xyz)
 
ErrorCode getBiasedMagnetometer (short[] bm_xyz)
 
ErrorCode getBiasedAccelerometer (short[] ba_xyz)
 
ErrorCode getRawGyro (double[] xyz_dps)
 
ErrorCode getAccelerometerAngles (double[] tiltAngles)
 
double getFusedHeading (FusionStatus toFill)
 
double getFusedHeading ()
 
int getFirmwareVersion ()
 
boolean hasResetOccurred ()
 
ErrorCode configSetCustomParam (int newValue, int paramIndex, int timeoutMs)
 
ErrorCode configSetCustomParam (int newValue, int paramIndex)
 
int configGetCustomParam (int paramIndex, int timoutMs)
 
int configGetCustomParam (int paramIndex)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal)
 
double configGetParameter (ParamEnum param, int ordinal, int timeoutMs)
 
double configGetParameter (ParamEnum param, int ordinal)
 
double configGetParameter (int param, int ordinal, int timeoutMs)
 
double configGetParameter (int param, int ordinal)
 
ErrorCode setStatusFramePeriod (PigeonIMU_StatusFrame statusFrame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (PigeonIMU_StatusFrame statusFrame, int periodMs)
 
ErrorCode setStatusFramePeriod (int statusFrame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (int statusFrame, int periodMs)
 
int getStatusFramePeriod (PigeonIMU_StatusFrame frame, int timeoutMs)
 
int getStatusFramePeriod (PigeonIMU_StatusFrame frame)
 
ErrorCode setControlFramePeriod (PigeonIMU_ControlFrame frame, int periodMs)
 
ErrorCode setControlFramePeriod (int frame, int periodMs)
 
ErrorCode getFaults (PigeonIMU_Faults toFill)
 
ErrorCode getStickyFaults (PigeonIMU_StickyFaults toFill)
 
ErrorCode clearStickyFaults (int timeoutMs)
 
ErrorCode clearStickyFaults ()
 
int getDeviceID ()
 
ErrorCode configAllSettings (PigeonIMUConfiguration allConfigs, int timeoutMs)
 
ErrorCode configAllSettings (PigeonIMUConfiguration allConfigs)
 
void getAllConfigs (PigeonIMUConfiguration allConfigs, int timeoutMs)
 
void getAllConfigs (PigeonIMUConfiguration allConfigs)
 
ErrorCode configFactoryDefault (int timeoutMs)
 
ErrorCode configFactoryDefault ()
 

Detailed Description

Pigeon IMU Class. Class supports communicating over CANbus and over ribbon-cable (CAN Talon SRX).

Constructor & Destructor Documentation

◆ PigeonIMU() [1/2]

com.ctre.phoenix.sensors.PigeonIMU.PigeonIMU ( int  deviceNumber)
inline

Create a Pigeon object that communicates with Pigeon on CAN Bus.

Parameters
deviceNumberCAN Device Id of Pigeon [0,62]

◆ PigeonIMU() [2/2]

com.ctre.phoenix.sensors.PigeonIMU.PigeonIMU ( TalonSRX  talonSrx)
inline

Create a Pigeon object that communciates with Pigeon through the Gadgeteer ribbon cable connected to a Talon on CAN Bus.

Parameters
talonSrxObject for the TalonSRX connected via ribbon cable.

Member Function Documentation

◆ addFusedHeading() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.addFusedHeading ( double  angleDeg,
int  timeoutMs 
)
inline

Atomically add to the Fused Heading register.

Parameters
angleDegDegrees to add to the Fused Heading register.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ addFusedHeading() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.addFusedHeading ( double  angleDeg)
inline

Atomically add to the Fused Heading register.

Parameters
angleDegDegrees to add to the Fused Heading register
Returns
Error Code generated by function. 0 indicates no error.

◆ addYaw() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.addYaw ( double  angleDeg,
int  timeoutMs 
)
inline

Atomically add to the Yaw register.

Parameters
angleDegDegrees to add to the Yaw register.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ addYaw() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.addYaw ( double  angleDeg)
inline

Atomically add to the Yaw register.

Parameters
angleDegDegrees to add to the Yaw register.
Returns
Error Code generated by function. 0 indicates no error.

◆ clearStickyFaults() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.clearStickyFaults ( int  timeoutMs)
inline

Clears the Sticky Faults

Parameters
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ clearStickyFaults() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.clearStickyFaults ( )
inline

Clears the Sticky Faults

Returns
Error Code generated by function. 0 indicates no error.

◆ configAllSettings() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configAllSettings ( PigeonIMUConfiguration  allConfigs,
int  timeoutMs 
)
inline

Configures all persistent settings.

Parameters
allConfigsObject with all of the persistant settings
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ configAllSettings() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configAllSettings ( PigeonIMUConfiguration  allConfigs)
inline

Configures all persistent settings (overloaded so timeoutMs is 50 ms).

Parameters
allConfigsObject with all of the persistant settings
Returns
Error Code generated by function. 0 indicates no error.

◆ configFactoryDefault() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configFactoryDefault ( int  timeoutMs)
inline

Configures all persistent settings to defaults.

Parameters
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ configFactoryDefault() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configFactoryDefault ( )
inline

Configures all persistent settings to defaults (overloaded so timeoutMs is 50 ms).

Returns
Error Code generated by function. 0 indicates no error.

◆ configGetCustomParam() [1/2]

int com.ctre.phoenix.sensors.PigeonIMU.configGetCustomParam ( int  paramIndex,
int  timoutMs 
)
inline

Gets the value of a custom parameter. This is for arbitrary use.

Sometimes it is necessary to save calibration/declination/offset information in the device. Particularly if the device is part of a subsystem that can be replaced.

Parameters
paramIndexIndex of custom parameter. [0-1]
timoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Value of the custom param.

◆ configGetCustomParam() [2/2]

int com.ctre.phoenix.sensors.PigeonIMU.configGetCustomParam ( int  paramIndex)
inline

Gets the value of a custom parameter. This is for arbitrary use.

Sometimes it is necessary to save calibration/declination/offset information in the device. Particularly if the device is part of a subsystem that can be replaced.

Parameters
paramIndexIndex of custom parameter. [0-1]
Returns
Value of the custom param.

◆ configGetParameter() [1/4]

double com.ctre.phoenix.sensors.PigeonIMU.configGetParameter ( ParamEnum  param,
int  ordinal,
int  timeoutMs 
)
inline

Gets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
ordinalOrdinal of parameter.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Value of parameter.

◆ configGetParameter() [2/4]

double com.ctre.phoenix.sensors.PigeonIMU.configGetParameter ( ParamEnum  param,
int  ordinal 
)
inline

Gets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
ordinalOrdinal of parameter.
Returns
Value of parameter.

◆ configGetParameter() [3/4]

double com.ctre.phoenix.sensors.PigeonIMU.configGetParameter ( int  param,
int  ordinal,
int  timeoutMs 
)
inline

Gets a parameter.

Parameters
paramParameter enumeration.
ordinalOrdinal of parameter.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Value of parameter.

◆ configGetParameter() [4/4]

double com.ctre.phoenix.sensors.PigeonIMU.configGetParameter ( int  param,
int  ordinal 
)
inline

Gets a parameter.

Parameters
paramParameter enumeration.
ordinalOrdinal of parameter.
Returns
Value of parameter.

◆ configSetCustomParam() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetCustomParam ( int  newValue,
int  paramIndex,
int  timeoutMs 
)
inline

Sets the value of a custom parameter. This is for arbitrary use.

Sometimes it is necessary to save calibration/declination/offset information in the device. Particularly if the device is part of a subsystem that can be replaced.

Parameters
newValueValue for custom parameter.
paramIndexIndex of custom parameter. [0-1]
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetCustomParam() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetCustomParam ( int  newValue,
int  paramIndex 
)
inline

Sets the value of a custom parameter. This is for arbitrary use.

Sometimes it is necessary to save calibration/declination/offset information in the device. Particularly if the device is part of a subsystem that can be replaced.

Parameters
newValueValue for custom parameter.
paramIndexIndex of custom parameter. [0-1]
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [1/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetParameter ( ParamEnum  param,
double  value,
int  subValue,
int  ordinal,
int  timeoutMs 
)
inline

Sets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [2/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetParameter ( ParamEnum  param,
double  value,
int  subValue,
int  ordinal 
)
inline

Sets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [3/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetParameter ( int  param,
double  value,
int  subValue,
int  ordinal,
int  timeoutMs 
)
inline

Sets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [4/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.configSetParameter ( int  param,
double  value,
int  subValue,
int  ordinal 
)
inline

Sets a parameter. Generally this is not used. This can be utilized in

  • Using new features without updating API installation.
  • Errata workarounds to circumvent API implementation.
  • Allows for rapid testing / unit testing of firmware.
Parameters
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
Returns
Error Code generated by function. 0 indicates no error.

◆ DestroyObject()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.DestroyObject ( )
inline

Destructor for Pigeon

Returns
Error Code generated by function. 0 indicates no error.

◆ enterCalibrationMode() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.enterCalibrationMode ( CalibrationMode  calMode,
int  timeoutMs 
)
inline

Enters the Calbration mode. See the Pigeon IMU documentation for More information on Calibration.

Note that you can instead use Phoenix Tuner to accomplish this. Note you should NOT be calling this during normal robot operation.

Parameters
calModeCalibration to execute
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ enterCalibrationMode() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.enterCalibrationMode ( CalibrationMode  calMode)
inline

Enters the Calbration mode. See the Pigeon IMU documentation for More information on Calibration.

Note that you can instead use Phoenix Tuner to accomplish this. Note you should not be using this in your normal robot application.

Parameters
calModeCalibration to execute
Returns
Error Code generated by function. 0 indicates no error.

◆ get6dQuaternion()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.get6dQuaternion ( double []  wxyz)
inline

Get 6d Quaternion data.

Parameters
wxyzArray to fill with quaternion data w[0], x[1], y[2], z[3]
Returns
The last ErrorCode generated.

◆ getAbsoluteCompassHeading()

double com.ctre.phoenix.sensors.PigeonIMU.getAbsoluteCompassHeading ( )
inline

Get the absolute compass heading.

Returns
compass heading [0,360) degrees.

◆ getAccelerometerAngles()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getAccelerometerAngles ( double []  tiltAngles)
inline

Get Accelerometer tilt angles.

Parameters
tiltAnglesArray to fill with x[0], y[1], and z[2] angles in degrees.
Returns
The last ErrorCode generated.

◆ getAccumGyro()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getAccumGyro ( double []  xyz_deg)
inline

Get AccumGyro data. AccumGyro is the integrated gyro value on each axis.

Parameters
xyz_degArray to fill with x[0], y[1], and z[2] AccumGyro data
Returns
The last ErrorCode generated.

◆ getAllConfigs() [1/2]

void com.ctre.phoenix.sensors.PigeonIMU.getAllConfigs ( PigeonIMUConfiguration  allConfigs,
int  timeoutMs 
)
inline

Gets all persistant settings.

Parameters
allConfigsObject with all of the persistant settings
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.

◆ getAllConfigs() [2/2]

void com.ctre.phoenix.sensors.PigeonIMU.getAllConfigs ( PigeonIMUConfiguration  allConfigs)
inline

Gets all persistant settings (overloaded so timeoutMs is 50 ms).

Parameters
allConfigsObject with all of the persistant settings

◆ getBiasedAccelerometer()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getBiasedAccelerometer ( short []  ba_xyz)
inline

Get Biased Accelerometer data.

Parameters
ba_xyzArray to fill with x[0], y[1], and z[2] data. These are in fixed point notation Q2.14. eg. 16384 = 1G
Returns
The last ErrorCode generated.

◆ getBiasedMagnetometer()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getBiasedMagnetometer ( short []  bm_xyz)
inline

Get Biased Magnetometer data.

Parameters
bm_xyzArray to fill with x[0], y[1], and z[2] data Number is equal to 0.6 microTeslas per unit.
Returns
The last ErrorCode generated.

◆ getCompassFieldStrength()

double com.ctre.phoenix.sensors.PigeonIMU.getCompassFieldStrength ( )
inline

Gets the compass' measured magnetic field strength.

Returns
field strength in Microteslas (uT).

◆ getCompassHeading()

double com.ctre.phoenix.sensors.PigeonIMU.getCompassHeading ( )
inline

Get the continuous compass heading.

Returns
continuous compass heading [-23040, 23040) degrees. Use SetCompassHeading to modify the wrap-around portion.

◆ getDeviceID()

int com.ctre.phoenix.sensors.PigeonIMU.getDeviceID ( )
inline
Returns
The Device Number

◆ getFaults()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getFaults ( PigeonIMU_Faults  toFill)
inline

Gets the fault status

Parameters
toFillContainer for fault statuses.
Returns
Error Code generated by function. 0 indicates no error.

◆ getFirmwareVersion()

int com.ctre.phoenix.sensors.PigeonIMU.getFirmwareVersion ( )
inline

Gets the firmware version of the device.

Returns
param holds the firmware version of the device. Device must be powered cycled at least once.

◆ getFusedHeading() [1/2]

double com.ctre.phoenix.sensors.PigeonIMU.getFusedHeading ( FusionStatus  toFill)
inline

Get the current Fusion Status (including fused heading)

Parameters
toFillobject reference to fill with fusion status flags. Caller may pass null if flags are not needed.
Returns
The fused heading in degrees.

◆ getFusedHeading() [2/2]

double com.ctre.phoenix.sensors.PigeonIMU.getFusedHeading ( )
inline

Gets the Fused Heading

Returns
The fused heading in degrees.

◆ getGeneralStatus()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getGeneralStatus ( GeneralStatus  toFill)
inline

Get the status of the current (or previousley complete) calibration.

Parameters
toFillContainer for the status information.
Returns
Error Code generated by function. 0 indicates no error.

◆ getLastError()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getLastError ( )
inline

Call GetLastError() generated by this object. Not all functions return an error code but can potentially report errors.

This function can be used to retrieve those error codes.

Returns
The last ErrorCode generated.

◆ getRawGyro()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getRawGyro ( double []  xyz_dps)
inline

Get Raw Gyro data.

Parameters
xyz_dpsArray to fill with x[0], y[1], and z[2] data in degrees per second.
Returns
The last ErrorCode generated.

◆ getRawMagnetometer()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getRawMagnetometer ( short []  rm_xyz)
inline

Get Raw Magnetometer data.

Parameters
rm_xyzArray to fill with x[0], y[1], and z[2] data Number is equal to 0.6 microTeslas per unit.
Returns
The last ErrorCode generated.

◆ getState()

PigeonState com.ctre.phoenix.sensors.PigeonIMU.getState ( )
inline

Gets the current Pigeon state

Returns
PigeonState enum

◆ getStatusFramePeriod() [1/2]

int com.ctre.phoenix.sensors.PigeonIMU.getStatusFramePeriod ( PigeonIMU_StatusFrame  frame,
int  timeoutMs 
)
inline

Gets the period of the given status frame.

Parameters
frameFrame to get the period of.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Period of the given status frame.

◆ getStatusFramePeriod() [2/2]

int com.ctre.phoenix.sensors.PigeonIMU.getStatusFramePeriod ( PigeonIMU_StatusFrame  frame)
inline

Gets the period of the given status frame.

Parameters
frameFrame to get the period of.
Returns
Period of the given status frame.

◆ getStickyFaults()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getStickyFaults ( PigeonIMU_StickyFaults  toFill)
inline

Gets the sticky fault status

Parameters
toFillContainer for sticky fault statuses.
Returns
Error Code generated by function. 0 indicates no error.

◆ getTemp()

double com.ctre.phoenix.sensors.PigeonIMU.getTemp ( )
inline

Gets the temperature of the pigeon.

Returns
Temperature in ('C)

◆ getUpTime()

int com.ctre.phoenix.sensors.PigeonIMU.getUpTime ( )
inline

Gets the current Pigeon uptime.

Returns
How long has Pigeon been running in whole seconds. Value caps at 255.

◆ getYawPitchRoll()

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.getYawPitchRoll ( double []  ypr_deg)
inline

Get Yaw, Pitch, and Roll data.

Parameters
ypr_degArray to fill with yaw[0], pitch[1], and roll[2] data. Yaw is within [-368,640, +368,640] degrees. Pitch is within [-90,+90] degrees. Roll is within [-90,+90] degrees.
Returns
The last ErrorCode generated.

◆ hasResetOccurred()

boolean com.ctre.phoenix.sensors.PigeonIMU.hasResetOccurred ( )
inline
Returns
true iff a reset has occurred since last call.

◆ setAccumZAngle() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setAccumZAngle ( double  angleDeg,
int  timeoutMs 
)
inline

Sets the AccumZAngle.

Parameters
angleDegDegrees to set AccumZAngle to.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setAccumZAngle() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setAccumZAngle ( double  angleDeg)
inline

Sets the AccumZAngle.

Parameters
angleDegDegrees to set AccumZAngle to.
Returns
Error Code generated by function. 0 indicates no error.

◆ setCompassAngle() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setCompassAngle ( double  angleDeg,
int  timeoutMs 
)
inline

Sets the compass angle. Although compass is absolute [0,360) degrees, the continuous compass register holds the wrap-arounds.

Parameters
angleDegDegrees to set continuous compass angle to.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setCompassAngle() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setCompassAngle ( double  angleDeg)
inline

Sets the compass angle. Although compass is absolute [0,360) degrees, the continuous compass register holds the wrap-arounds.

Parameters
angleDegDegrees to set continuous compass angle to.
Returns
Error Code generated by function. 0 indicates no error.

◆ setCompassDeclination() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setCompassDeclination ( double  angleDegOffset,
int  timeoutMs 
)
inline

Set the declination for compass. Declination is the difference between Earth Magnetic north, and the geographic "True North".

Parameters
angleDegOffsetDegrees to set Compass Declination to.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setCompassDeclination() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setCompassDeclination ( double  angleDegOffset)
inline

Set the declination for compass. Declination is the difference between Earth Magnetic north, and the geographic "True North".

Parameters
angleDegOffsetDegrees to set Compass Declination to.
Returns
Error Code generated by function. 0 indicates no error.

◆ setControlFramePeriod() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setControlFramePeriod ( PigeonIMU_ControlFrame  frame,
int  periodMs 
)
inline

Sets the period of the given control frame.

Parameters
frameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setControlFramePeriod() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setControlFramePeriod ( int  frame,
int  periodMs 
)
inline

Sets the period of the given control frame.

Parameters
frameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setFusedHeading() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setFusedHeading ( double  angleDeg,
int  timeoutMs 
)
inline

Sets the Fused Heading to the specified value.

Parameters
angleDegNew fused-heading in degrees [+/- 23,040 degrees]
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setFusedHeading() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setFusedHeading ( double  angleDeg)
inline

Sets the Fused Heading to the specified value.

Parameters
angleDegNew fused-heading in degrees [+/- 23,040 degrees]
Returns
Error Code generated by function. 0 indicates no error.

◆ setFusedHeadingToCompass() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setFusedHeadingToCompass ( int  timeoutMs)
inline

Sets the Fused Heading register to match the current compass value.

Parameters
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setFusedHeadingToCompass() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setFusedHeadingToCompass ( )
inline

Sets the Fused Heading register to match the current compass value.

Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [1/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setStatusFramePeriod ( PigeonIMU_StatusFrame  statusFrame,
int  periodMs,
int  timeoutMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [2/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setStatusFramePeriod ( PigeonIMU_StatusFrame  statusFrame,
int  periodMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [3/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setStatusFramePeriod ( int  statusFrame,
int  periodMs,
int  timeoutMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [4/4]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setStatusFramePeriod ( int  statusFrame,
int  periodMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setTemperatureCompensationDisable() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setTemperatureCompensationDisable ( boolean  bTempCompDisable,
int  timeoutMs 
)
inline

Disable/Enable Temp compensation. Pigeon has this on/False at boot.

Parameters
bTempCompDisableSet to "False" to enable temperature compensation.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setTemperatureCompensationDisable() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setTemperatureCompensationDisable ( boolean  bTempCompDisable)
inline

Disable/Enable Temp compensation. Pigeon has this on/False at boot.

Parameters
bTempCompDisableSet to "False" to enable temperature compensation.
Returns
Error Code generated by function. 0 indicates no error.

◆ setYaw() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setYaw ( double  angleDeg,
int  timeoutMs 
)
inline

Sets the Yaw register to the specified value.

Parameters
angleDegNew yaw in degrees [+/- 368,640 degrees]
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setYaw() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setYaw ( double  angleDeg)
inline

Sets the Yaw register to the specified value.

Parameters
angleDegNew yaw in degrees [+/- 368,640 degrees]
Returns
Error Code generated by function. 0 indicates no error.

◆ setYawToCompass() [1/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setYawToCompass ( int  timeoutMs)
inline

Sets the Yaw register to match the current compass value.

Parameters
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

◆ setYawToCompass() [2/2]

ErrorCode com.ctre.phoenix.sensors.PigeonIMU.setYawToCompass ( )
inline

Sets the Yaw register to match the current compass value.

Returns
Error Code generated by function. 0 indicates no error.

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