Package com.ctre.phoenix.sensors
Class WPI_Pigeon2
java.lang.Object
com.ctre.phoenix.sensors.BasePigeon
com.ctre.phoenix.sensors.Pigeon2
com.ctre.phoenix.sensors.WPI_Pigeon2
- All Implemented Interfaces:
Sendable
,Gyro
,AutoCloseable
public class WPI_Pigeon2 extends Pigeon2 implements Sendable, Gyro
-
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)
Constructor for Pigeon 2.WPI_Pigeon2(int deviceNumber, String canbus)
Constructor for Pigeon 2. -
Method Summary
Modifier and Type Method Description void
calibrate()
This function does nothing, it exists to satisfy the WPILib Gyro interface.void
close()
double
getAngle()
double
getRate()
Rotation2d
getRotation2d()
void
initSendable(SendableBuilder builder)
void
reset()
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
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
Constructor for Pigeon 2.- Parameters:
deviceNumber
- device ID of Pigeon 2
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
calibrate
This function does nothing, it exists to satisfy the WPILib Gyro interface. Pigeon does calibration on boot and any one-time calibrations (like temperature) are done via Phoenix Tuner. -
reset
-
getAngle
-
getRate
-
getRotation2d
- Specified by:
getRotation2d
in interfaceGyro
-
initSendable
- Specified by:
initSendable
in interfaceSendable
-