Class WPI_Pigeon2
- All Implemented Interfaces:
Sendable
,AutoCloseable
@Deprecated(since="2024", forRemoval=true) public class WPI_Pigeon2 extends Pigeon2 implements Sendable, AutoCloseable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix.sensors.Pigeon2
Pigeon2.AxisDirection
-
Constructor Summary
Constructors Constructor Description WPI_Pigeon2(int deviceNumber)
Deprecated, for removal: This API element is subject to removal in a future version.Constructor for Pigeon 2.WPI_Pigeon2(int deviceNumber, String canbus)
Deprecated, for removal: This API element is subject to removal in a future version.Constructor for Pigeon 2. -
Method Summary
Modifier and Type Method Description void
close()
Deprecated, for removal: This API element is subject to removal in a future version.double
getAngle()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the heading of the robot in degrees.double
getRate()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the rate of rotation of the Pigeon 2.Rotation2d
getRotation2d()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the heading of the robot as aRotation2d
.void
initSendable(SendableBuilder builder)
Deprecated, for removal: This API element is subject to removal in a future version.void
reset()
Deprecated, for removal: This API element is subject to removal in a future version.Resets the Pigeon 2 to a heading of zero.Methods inherited from class com.ctre.phoenix.sensors.Pigeon2
configAllSettings, configAllSettings, configDisableNoMotionCalibration, configDisableNoMotionCalibration, configDisableTemperatureCompensation, configDisableTemperatureCompensation, configEnableCompass, configEnableCompass, configMountPose, configMountPose, configMountPose, configMountPose, configMountPosePitch, configMountPosePitch, configMountPoseRoll, configMountPoseRoll, configMountPoseYaw, configMountPoseYaw, configXAxisGyroError, configXAxisGyroError, configYAxisGyroError, configYAxisGyroError, configZAxisGyroError, configZAxisGyroError, getAllConfigs, getAllConfigs, getFaults, getGravityVector, getStickyFaults, zeroGyroBiasNow, zeroGyroBiasNow
Methods inherited from class com.ctre.phoenix.sensors.BasePigeon
addYaw, addYaw, clearStickyFaults, clearStickyFaults, configAllSettings, configAllSettings, configFactoryDefault, configFactoryDefault, configGetCustomParam, configGetCustomParam, configGetParameter, configGetParameter, configGetParameter, configGetParameter, configSetCustomParam, configSetCustomParam, configSetParameter, configSetParameter, configSetParameter, configSetParameter, DestroyObject, get6dQuaternion, getAbsoluteCompassHeading, getAccumGyro, getAllConfigs, getAllConfigs, getBiasedAccelerometer, getBiasedMagnetometer, getCompassFieldStrength, getCompassHeading, getDeviceID, getFirmwareVersion, getHandle, getLastError, getPitch, getRawGyro, getRawMagnetometer, getResetCount, getResetFlags, getRoll, getSimCollection, getStatusFramePeriod, getStatusFramePeriod, getTemp, getUpTime, getYaw, getYawPitchRoll, hasResetOccurred, setAccumZAngle, setAccumZAngle, setControlFramePeriod, setControlFramePeriod, setStatusFramePeriod, setStatusFramePeriod, setStatusFramePeriod, setStatusFramePeriod, setYaw, setYaw, setYawToCompass, setYawToCompass
-
Constructor Details
-
WPI_Pigeon2
Deprecated, for removal: This API element is subject to removal in a future version.Constructor for Pigeon 2.- Parameters:
deviceNumber
- device ID of Pigeon 2canbus
- Name of the CANbus; can be a CANivore device name or serial number. Pass in nothing or "rio" to use the roboRIO.
-
WPI_Pigeon2
Deprecated, for removal: This API element is subject to removal in a future version.Constructor for Pigeon 2.- Parameters:
deviceNumber
- device ID of Pigeon 2
-
-
Method Details
-
close
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
-
reset
Deprecated, for removal: This API element is subject to removal in a future version.Resets the Pigeon 2 to a heading of zero.This can be used if there is significant drift in the gyro, and it needs to be recalibrated after it has been running.
-
getAngle
Deprecated, for removal: This API element is subject to removal in a future version.Returns the heading of the robot in degrees.The angle increases as the Pigeon 2 turns clockwise when looked at from the top. This follows the NED axis convention.
The angle is continuous; that is, it will continue from 360 to 361 degrees. This allows for algorithms that wouldn't want to see a discontinuity in the gyro output as it sweeps past from 360 to 0 on the second time around.
- Returns:
- The current heading of the robot in degrees
-
getRate
Deprecated, for removal: This API element is subject to removal in a future version.Returns the rate of rotation of the Pigeon 2.The rate is positive as the Pigeon 2 turns clockwise when looked at from the top.
- Returns:
- The current rate in degrees per second
-
getRotation2d
Deprecated, for removal: This API element is subject to removal in a future version.Returns the heading of the robot as aRotation2d
.The angle increases as the Pigeon 2 turns counterclockwise when looked at from the top. This follows the NWU axis convention.
The angle is continuous; that is, it will continue from 360 to 361 degrees. This allows for algorithms that wouldn't want to see a discontinuity in the gyro output as it sweeps past from 360 to 0 on the second time around.
- Returns:
- The current heading of the robot as a
Rotation2d
-
initSendable
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
initSendable
in interfaceSendable
-